16 ms·
> It's the job of the validation engine to convert all URLs and email addresses to a canonical form I don't think <input type="email"> does that though. Maybe
by seszett 11y ago
> It's the job of the validation engine to convert all URLs and email addresses to a canonical form
I don't think <input type="email"> does that though. Maybe it should, but users might be surprised to see their address automatically turn into some ugly unreadable xn--whatver-d7a domain. After form submission then yes of course any sane process will convert them to a canonical form.
I know there were good reasons to use punycode instead of UTF8 for IDNs, but it sure is a mess.
- kijin 11y agoYeah, I think we'll have to treat email addresses as just another kind of untrustworthy input that needs to be escaped in various ways depending on the context. Punycode for storage and validation, back to UTF-8 for display, back to punycode when it goes in a mailto: link, etc. Ditto for URLs. The days of easy parsing are sadly forever gone.