[html5] r7770 - [giow] (3) Update to e-mail syntax checking for better compliance with the relev [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Mar 25 16:18:47 PDT 2013


Author: ianh
Date: 2013-03-25 16:18:45 -0700 (Mon, 25 Mar 2013)
New Revision: 7770

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Update to e-mail syntax checking for better compliance with the relevant RFCs.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19117
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2013-03-25 22:51:00 UTC (rev 7769)
+++ complete.html	2013-03-25 23:18:45 UTC (rev 7770)
@@ -46359,11 +46359,18 @@
 
    </dd>
 
-  </dl><p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the ABNF production <code title="">1*( atext / "." ) "@" ldh-str *( "." ldh-str )</code>
-  where <code title="">atext</code> is defined in <a href=http://tools.ietf.org/html/rfc5322#section-3.2.3>RFC 5322 section 3.2.3</a>, and <code title="">ldh-str</code> is defined in <a href=http://tools.ietf.org/html/rfc1034#section-3.5>RFC
-  1034 section 3.5</a>. <a href=#refsABNF>[ABNF]</a> <a href=#refsRFC5322>[RFC5322]</a> <a href=#refsRFC1034>[RFC1034]</a></p> <!-- Domain syntax based on section 3.5 of [RFC1034] and
-  section 2.1 of [RFC1123] -->
+  </dl><p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the <code title="">email</code>
+  production of the following ABNF, the character set for which is Unicode. This ABNF implements the
+  extensions described in RFC 1123. <a href=#refsABNF>[ABNF]</a> <a href=#refsRFC5322>[RFC5322]</a> <a href=#refsRFC1034>[RFC1034]</a> <a href=#refsRFC1123>[RFC1123]</a></p>
 
+  <pre>email         = 1*( atext / "." ) "@" label *( "." label )
+label         = let-dig [ [ ldh-str ] let-dig ]  ; limited to a length of 255 characters by <a href=http://tools.ietf.org/html/rfc1123#section-2>RFC 1123 section 2.1</a>
+atext         = < as defined in <a href=http://tools.ietf.org/html/rfc5322#section-3.2.3>RFC 5322 section 3.2.3</a> >
+let-dig       = < as defined in <a href=http://tools.ietf.org/html/rfc1034#section-3.5>RFC 1034 section 3.5</a> >
+ldh-str       = < as defined in <a href=http://tools.ietf.org/html/rfc1034#section-3.5>RFC 1034 section 3.5</a> ></pre>
+
+  <!-- Domain syntax based on section 3.5 of [RFC1034] and section 2.1 of [RFC1123] -->
+
   <p class=note>This requirement is a <a href=#willful-violation>willful violation</a> 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
@@ -46378,7 +46385,7 @@
    <p>The following JavaScript- and Perl-compatible regular expression is an implementation of the
    above definition.</p>
 
-   <pre>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/</pre>
+   <pre>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$/</pre>
 
    <!-- based on: http://blog.gerv.net/2011/05/html5_email_address_regexp/ -->
 
@@ -101098,6 +101105,9 @@
    <dt id=refsRFC1034>[RFC1034]</dt>
    <dd><cite><a href=http://tools.ietf.org/html/rfc1034>Domain Names - Concepts and Facilities</a></cite>, P. Mockapetris. IETF, November 1987.</dd>
 
+   <dt id=refsRFC1123>[RFC1123]</dt>
+   <dd><cite><a href=http://tools.ietf.org/html/rfc1123>Requirements for Internet Hosts -- Application and Support</a></cite>, R. Braden. IETF, October 1989.</dd>
+
    <dt id=refsRFC1345>[RFC1345]</dt>
    <dd><cite><a href=http://tools.ietf.org/html/rfc1345>Character Mnemonics and Character Sets</a></cite>, K. Simonsen. IETF.</dd>
 
@@ -101691,6 +101701,7 @@
   Maik Merten,
   Malcolm Rowe,
   Manish Tripathi,
+  Marcus Bointon,
   Mark Birbeck,
   Mark Davis,
   Mark Miller,

Modified: index
===================================================================
--- index	2013-03-25 22:51:00 UTC (rev 7769)
+++ index	2013-03-25 23:18:45 UTC (rev 7770)
@@ -46359,11 +46359,18 @@
 
    </dd>
 
-  </dl><p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the ABNF production <code title="">1*( atext / "." ) "@" ldh-str *( "." ldh-str )</code>
-  where <code title="">atext</code> is defined in <a href=http://tools.ietf.org/html/rfc5322#section-3.2.3>RFC 5322 section 3.2.3</a>, and <code title="">ldh-str</code> is defined in <a href=http://tools.ietf.org/html/rfc1034#section-3.5>RFC
-  1034 section 3.5</a>. <a href=#refsABNF>[ABNF]</a> <a href=#refsRFC5322>[RFC5322]</a> <a href=#refsRFC1034>[RFC1034]</a></p> <!-- Domain syntax based on section 3.5 of [RFC1034] and
-  section 2.1 of [RFC1123] -->
+  </dl><p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the <code title="">email</code>
+  production of the following ABNF, the character set for which is Unicode. This ABNF implements the
+  extensions described in RFC 1123. <a href=#refsABNF>[ABNF]</a> <a href=#refsRFC5322>[RFC5322]</a> <a href=#refsRFC1034>[RFC1034]</a> <a href=#refsRFC1123>[RFC1123]</a></p>
 
+  <pre>email         = 1*( atext / "." ) "@" label *( "." label )
+label         = let-dig [ [ ldh-str ] let-dig ]  ; limited to a length of 255 characters by <a href=http://tools.ietf.org/html/rfc1123#section-2>RFC 1123 section 2.1</a>
+atext         = < as defined in <a href=http://tools.ietf.org/html/rfc5322#section-3.2.3>RFC 5322 section 3.2.3</a> >
+let-dig       = < as defined in <a href=http://tools.ietf.org/html/rfc1034#section-3.5>RFC 1034 section 3.5</a> >
+ldh-str       = < as defined in <a href=http://tools.ietf.org/html/rfc1034#section-3.5>RFC 1034 section 3.5</a> ></pre>
+
+  <!-- Domain syntax based on section 3.5 of [RFC1034] and section 2.1 of [RFC1123] -->
+
   <p class=note>This requirement is a <a href=#willful-violation>willful violation</a> 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
@@ -46378,7 +46385,7 @@
    <p>The following JavaScript- and Perl-compatible regular expression is an implementation of the
    above definition.</p>
 
-   <pre>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/</pre>
+   <pre>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$/</pre>
 
    <!-- based on: http://blog.gerv.net/2011/05/html5_email_address_regexp/ -->
 
@@ -101098,6 +101105,9 @@
    <dt id=refsRFC1034>[RFC1034]</dt>
    <dd><cite><a href=http://tools.ietf.org/html/rfc1034>Domain Names - Concepts and Facilities</a></cite>, P. Mockapetris. IETF, November 1987.</dd>
 
+   <dt id=refsRFC1123>[RFC1123]</dt>
+   <dd><cite><a href=http://tools.ietf.org/html/rfc1123>Requirements for Internet Hosts -- Application and Support</a></cite>, R. Braden. IETF, October 1989.</dd>
+
    <dt id=refsRFC1345>[RFC1345]</dt>
    <dd><cite><a href=http://tools.ietf.org/html/rfc1345>Character Mnemonics and Character Sets</a></cite>, K. Simonsen. IETF.</dd>
 
@@ -101691,6 +101701,7 @@
   Maik Merten,
   Malcolm Rowe,
   Manish Tripathi,
+  Marcus Bointon,
   Mark Birbeck,
   Mark Davis,
   Mark Miller,

Modified: source
===================================================================
--- source	2013-03-25 22:51:00 UTC (rev 7769)
+++ source	2013-03-25 23:18:45 UTC (rev 7770)
@@ -55606,15 +55606,20 @@
 
   </dl>
 
-  <p>A <dfn>valid e-mail address</dfn> is a string that matches the ABNF production <code
-  title="">1*( atext / "." ) "@" ldh-str *( "." ldh-str )</code>
-  where <code title="">atext</code> is defined in <a
-  href="http://tools.ietf.org/html/rfc5322#section-3.2.3">RFC 5322 section 3.2.3</a>, and <code
-  title="">ldh-str</code> is defined in <a href="http://tools.ietf.org/html/rfc1034#section-3.5">RFC
-  1034 section 3.5</a>. <a href="#refsABNF">[ABNF]</a> <a href="#refsRFC5322">[RFC5322]</a> <a
-  href="#refsRFC1034">[RFC1034]</a></p> <!-- Domain syntax based on section 3.5 of [RFC1034] and
-  section 2.1 of [RFC1123] -->
+  <p>A <dfn>valid e-mail address</dfn> is a string that matches the <code title="">email</code>
+  production of the following ABNF, the character set for which is Unicode. This ABNF implements the
+  extensions described in RFC 1123. <a href="#refsABNF">[ABNF]</a> <a
+  href="#refsRFC5322">[RFC5322]</a> <a href="#refsRFC1034">[RFC1034]</a> <a
+  href="#refsRFC1123">[RFC1123]</a></p>
 
+  <pre>email         = 1*( atext / "." ) "@" label *( "." label )
+label         = let-dig [ [ ldh-str ] let-dig ]  ; limited to a length of 255 characters by <a href="http://tools.ietf.org/html/rfc1123#section-2">RFC 1123 section 2.1</a>
+atext         = < as defined in <a href="http://tools.ietf.org/html/rfc5322#section-3.2.3">RFC 5322 section 3.2.3</a> >
+let-dig       = < as defined in <a href="http://tools.ietf.org/html/rfc1034#section-3.5">RFC 1034 section 3.5</a> >
+ldh-str       = < as defined in <a href="http://tools.ietf.org/html/rfc1034#section-3.5">RFC 1034 section 3.5</a> ></pre>
+
+  <!-- Domain syntax based on section 3.5 of [RFC1034] and section 2.1 of [RFC1123] -->
+
   <p class="note">This requirement is a <span>willful violation</span> 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
@@ -55629,7 +55634,7 @@
    <p>The following JavaScript- and Perl-compatible regular expression is an implementation of the
    above definition.</p>
 
-   <pre>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/</pre>
+   <pre>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$/</pre>
 
    <!-- based on: http://blog.gerv.net/2011/05/html5_email_address_regexp/ -->
 
@@ -118240,6 +118245,9 @@
    <dt id="refsRFC1034">[RFC1034]</dt>
    <dd><cite><a href="http://tools.ietf.org/html/rfc1034">Domain Names - Concepts and Facilities</a></cite>, P. Mockapetris. IETF, November 1987.</dd>
 
+   <dt id="refsRFC1123">[RFC1123]</dt>
+   <dd><cite><a href="http://tools.ietf.org/html/rfc1123">Requirements for Internet Hosts -- Application and Support</a></cite>, R. Braden. IETF, October 1989.</dd>
+
    <dt id="refsRFC1321">[RFC1321]</dt>
    <dd><cite><a href="http://tools.ietf.org/html/rfc1321">The MD5 Message-Digest Algorithm</a></cite>, R. Rivest. IETF.</dd>
 
@@ -118922,6 +118930,7 @@
   Maik Merten,
   Malcolm Rowe,
   Manish Tripathi,
+  Marcus Bointon,
   Mark Birbeck,
   Mark Davis,
   Mark Miller,




More information about the Commit-Watchers mailing list