Closed
Bug 791069
Opened 12 years ago
Closed 12 years ago
Firefox considers correct e-mail address as incorrect
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: sylvhem+mozilla, Unassigned)
Details
Attachments
(1 file, 3 obsolete files)
4.87 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1 Build ID: 20120907231835 Steps to reproduce: I input an exotic but correct e-mail address in a HTML5 field for this address (<input type="email" />). Example of address : "John[Doe]"@example.com Actual results: Firefox highlights the field in red. Expected results: Firefox should considers this address as a correct (cf RFC 5322 chapter 3.4).
Comment 1•12 years ago
|
||
The specification is here : http://www.whatwg.org/specs/web-apps/current-work/#valid-e-mail-address I'm not not good at reading specs and regexp but it looks like that quotes aren't allowed.
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Comment 2•12 years ago
|
||
(In reply to Matthias Versen (Matti) from comment #1) > The specification is here : > http://www.whatwg.org/specs/web-apps/current-work/#valid-e-mail-address Multipage link: http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address > I'm not not good at reading specs and regexp but it looks like that quotes > aren't allowed. Indeed. HTML willfully violates RFC 5322: "This requirement is a willful violation of RFC 5322, which defines a syntax for e-mail addresses that is simultaneously too strict (before the "@" character), too vague (after the "@" character), and too lax (allowing comments, whitespace characters, and quoted strings in manners unfamiliar to most users) to be of practical use here." Probably a WONTFIX.
Yep. Please raise this issue with HTML if you want to take it further.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Comment 4•11 years ago
|
||
I've created two sets of diffs, as the WHATWG willful-violation prohibiting valid addresses seems like it makes the input type useless for general use (i.e. if you want to accept standard eMail addresses you're stuck with a text input). A few people seem to feel like this is a bug in the WHATWG spec, e.g. bug 781574 and bug 656009. The second patch I'll attach extends the validation to also verify length limits according to the eMail standards (RFC 5321), and support internationalized local-parts according to RFC 5336. It also only puny-codes the domain which helps alleviate some length pressure.
Comment 5•11 years ago
|
||
Alternative patch which is more invasive but is closer to correctly validating eMail addresses.
Comment 6•11 years ago
|
||
(In reply to Matthew Wronka from comment #4) > A few people seem to feel like this is a bug in the WHATWG spec, e.g. bug > 781574 and bug 656009. Sorry, 656009 is unrelated to this.
Comment 7•11 years ago
|
||
Attachment #763186 -
Attachment is obsolete: true
Attachment #763187 -
Attachment is obsolete: true
Comment 8•10 years ago
|
||
Attachment #799830 -
Attachment is obsolete: true
Comment 9•10 years ago
|
||
Matthew, while your work is appreciated, it is unlikely to get incorporated into the codebase as long as the HTML spec continues to willfully violate RFC 5322. This bug is closed, and it would be fruitless to continue to attach patches to it. If you feel strongly about the restriction on the content of <input type="email" />, you should take it up with the WHATWG: * http://www.whatwg.org/mailing-list#specs * https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WHATWG&component=HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•