Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Defer to URL spec for IDNA stuff.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23005
Affected topics: HTML, Security

git-svn-id: http://svn.whatwg.org/webapps@8381 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 7, 2014
1 parent 94938d4 commit 21d0bbd
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 48 deletions.
41 changes: 25 additions & 16 deletions complete.html
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 January 2014</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 7 January 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -3543,7 +3543,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>

<dd>

<p>The following terms are defined in the URL standard: <a href=#refsURL>[URL]</a></p>
<p>The following terms are defined in the WHATWG URL standard: <a href=#refsURL>[URL]</a></p>

<ul class=brief><li><dfn id=url>URL</dfn>
<li><dfn id=absolute-url>Absolute URL</dfn>
Expand All @@ -3567,6 +3567,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=utf-8-percent-encode>UTF-8 percent encode</dfn>
<li><dfn id=percent-decode>Percent decode</dfn>
<li><dfn id=decoder-error>Decoder error</dfn>
<li>The <dfn id=domain-label-to-ascii>domain label to ASCII</dfn> algorithm</li>
<li>The <dfn id=domain-label-to-unicode>domain label to Unicode</dfn> algorithm</li>
<li><dfn id=urlutils><code>URLUtils</code></dfn> interface
<li><dfn id=urlutilsreadonly><code>URLUtilsReadOnly</code></dfn> interface
<li><dfn id=dom-url-href title=dom-url-href><code>href</code> attribute</dfn>
Expand Down Expand Up @@ -65620,9 +65622,10 @@ <h3 id=origin-0><span class=secno>6.3 </span>Origin</h3>

<li><p>Append the string "<code title="">://</code>" to <var title="">result</var>.</li>

<li><p>Apply the IDNA ToUnicode algorithm to each component of the host part of the
<!--CLEANUP-->
<li><p>Apply the <a href=#domain-label-to-unicode>domain label to Unicode</a> algorithm to each component of the host part of the
<a href=#origin>origin</a> tuple, and append the results &mdash; each component, in the same order,
separated by U+002E FULL STOP characters (.) &mdash; to <var title="">result</var>. <a href=#refsRFC3490>[RFC3490]</a></li> <!--XXX-23005-->
separated by U+002E FULL STOP characters (.) &mdash; to <var title="">result</var>. <a href=#refsURL>[URL]</a></li>

<li><p>If the port part of the <a href=#origin>origin</a> tuple gives a port that is different from the
default port for the protocol given by the scheme part of the <a href=#origin>origin</a> tuple, then
Expand All @@ -65643,12 +65646,14 @@ <h3 id=origin-0><span class=secno>6.3 </span>Origin</h3>

<li>

<p>Apply the IDNA ToASCII algorithm to the host part of the <a href=#origin>origin</a> tuple, with both
the AllowUnassigned and UseSTD3ASCIIRules flags set, and append the results to <var title="">result</var>.</p> <!--XXX-23005-->
<p>Apply the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm to each component of the host part of
the <a href=#origin>origin</a> tuple, and append the results &mdash; each component, in the same order,
separated by U+002E FULL STOP characters (.) &mdash; to <var title="">result</var>. <a href=#refsURL>[URL]</a></p>

<p>If ToASCII fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then return the empty string and abort these steps.
<a href=#refsRFC3490>[RFC3490]</a></p>
<!--CLEANUP-->
<p>If the ToASCII algorithm used by the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then throw a <code><a href=#securityerror>SecurityError</a></code> exception and
abort these steps. <a href=#refsRFC3490>[RFC3490]</a></p>

</li>

Expand Down Expand Up @@ -65732,11 +65737,16 @@ <h4 id=relaxing-the-same-origin-restriction><span class=secno>6.3.1 </span>Relax
<li>

<p>If the new value is an IPv4 or IPv6 address, let <var title="">new value</var> be the new
value. Otherwise, apply the IDNA ToASCII algorithm to the new value, with both the
AllowUnassigned and UseSTD3ASCIIRules flags set, and let <var title="">new value</var> be the
result of the ToASCII algorithm.</p> <!--XXX-23005-->
value.</p>

<p>Otherwise, <a href=#strictly-split-a-string title="strictly split a string">strictly split</a> the new value on
U+002E FULL STOP characters (.), apply the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm to each
returned token, and let <var title="">new value</var> be the result of concatenating the
results of applying that algorithm to each token, in the same order, separated by U+002E FULL
STOP characters (.). <a href=#refsURL>[URL]</a></p>

<p>If ToASCII fails to convert one of the components of the string, e.g. because it is too long
<!--CLEANUP-->
<p>If the ToASCII algorithm used by the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then throw a <code><a href=#securityerror>SecurityError</a></code> exception and
abort these steps. <a href=#refsRFC3490>[RFC3490]</a></p>

Expand Down Expand Up @@ -65774,9 +65784,8 @@ <h4 id=relaxing-the-same-origin-restriction><span class=secno>6.3.1 </span>Relax
the Public Suffix List, then throw a <code><a href=#securityerror>SecurityError</a></code> exception and abort these
steps. <a href=#refsPSL>[PSL]</a></p>

<p>Suffixes must be compared after applying the IDNA ToASCII algorithm to them, with both the
AllowUnassigned and UseSTD3ASCIIRules flags set, in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
manner. <a href=#refsRFC3490>[RFC3490]</a></p> <!--XXX-23005-->
<p>Suffixes must be compared in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> manner, after applying
the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm to their individual components, . <a href=#refsURL>[URL]</a></p>

</li>

Expand Down
41 changes: 25 additions & 16 deletions index
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 January 2014</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 7 January 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -3543,7 +3543,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<dd>

<p>The following terms are defined in the URL standard: <a href=#refsURL>[URL]</a></p>
<p>The following terms are defined in the WHATWG URL standard: <a href=#refsURL>[URL]</a></p>

<ul class=brief><li><dfn id=url>URL</dfn>
<li><dfn id=absolute-url>Absolute URL</dfn>
Expand All @@ -3567,6 +3567,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn id=utf-8-percent-encode>UTF-8 percent encode</dfn>
<li><dfn id=percent-decode>Percent decode</dfn>
<li><dfn id=decoder-error>Decoder error</dfn>
<li>The <dfn id=domain-label-to-ascii>domain label to ASCII</dfn> algorithm</li>
<li>The <dfn id=domain-label-to-unicode>domain label to Unicode</dfn> algorithm</li>
<li><dfn id=urlutils><code>URLUtils</code></dfn> interface
<li><dfn id=urlutilsreadonly><code>URLUtilsReadOnly</code></dfn> interface
<li><dfn id=dom-url-href title=dom-url-href><code>href</code> attribute</dfn>
Expand Down Expand Up @@ -65620,9 +65622,10 @@ x === this; // true</pre>

<li><p>Append the string "<code title="">://</code>" to <var title="">result</var>.</li>

<li><p>Apply the IDNA ToUnicode algorithm to each component of the host part of the
<!--CLEANUP-->
<li><p>Apply the <a href=#domain-label-to-unicode>domain label to Unicode</a> algorithm to each component of the host part of the
<a href=#origin>origin</a> tuple, and append the results &mdash; each component, in the same order,
separated by U+002E FULL STOP characters (.) &mdash; to <var title="">result</var>. <a href=#refsRFC3490>[RFC3490]</a></li> <!--XXX-23005-->
separated by U+002E FULL STOP characters (.) &mdash; to <var title="">result</var>. <a href=#refsURL>[URL]</a></li>

<li><p>If the port part of the <a href=#origin>origin</a> tuple gives a port that is different from the
default port for the protocol given by the scheme part of the <a href=#origin>origin</a> tuple, then
Expand All @@ -65643,12 +65646,14 @@ x === this; // true</pre>

<li>

<p>Apply the IDNA ToASCII algorithm to the host part of the <a href=#origin>origin</a> tuple, with both
the AllowUnassigned and UseSTD3ASCIIRules flags set, and append the results to <var title="">result</var>.</p> <!--XXX-23005-->
<p>Apply the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm to each component of the host part of
the <a href=#origin>origin</a> tuple, and append the results &mdash; each component, in the same order,
separated by U+002E FULL STOP characters (.) &mdash; to <var title="">result</var>. <a href=#refsURL>[URL]</a></p>

<p>If ToASCII fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then return the empty string and abort these steps.
<a href=#refsRFC3490>[RFC3490]</a></p>
<!--CLEANUP-->
<p>If the ToASCII algorithm used by the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then throw a <code><a href=#securityerror>SecurityError</a></code> exception and
abort these steps. <a href=#refsRFC3490>[RFC3490]</a></p>

</li>

Expand Down Expand Up @@ -65732,11 +65737,16 @@ x === this; // true</pre>
<li>

<p>If the new value is an IPv4 or IPv6 address, let <var title="">new value</var> be the new
value. Otherwise, apply the IDNA ToASCII algorithm to the new value, with both the
AllowUnassigned and UseSTD3ASCIIRules flags set, and let <var title="">new value</var> be the
result of the ToASCII algorithm.</p> <!--XXX-23005-->
value.</p>

<p>Otherwise, <a href=#strictly-split-a-string title="strictly split a string">strictly split</a> the new value on
U+002E FULL STOP characters (.), apply the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm to each
returned token, and let <var title="">new value</var> be the result of concatenating the
results of applying that algorithm to each token, in the same order, separated by U+002E FULL
STOP characters (.). <a href=#refsURL>[URL]</a></p>

<p>If ToASCII fails to convert one of the components of the string, e.g. because it is too long
<!--CLEANUP-->
<p>If the ToASCII algorithm used by the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then throw a <code><a href=#securityerror>SecurityError</a></code> exception and
abort these steps. <a href=#refsRFC3490>[RFC3490]</a></p>

Expand Down Expand Up @@ -65774,9 +65784,8 @@ x === this; // true</pre>
the Public Suffix List, then throw a <code><a href=#securityerror>SecurityError</a></code> exception and abort these
steps. <a href=#refsPSL>[PSL]</a></p>

<p>Suffixes must be compared after applying the IDNA ToASCII algorithm to them, with both the
AllowUnassigned and UseSTD3ASCIIRules flags set, in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
manner. <a href=#refsRFC3490>[RFC3490]</a></p> <!--XXX-23005-->
<p>Suffixes must be compared in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> manner, after applying
the <a href=#domain-label-to-ascii>domain label to ASCII</a> algorithm to their individual components, . <a href=#refsURL>[URL]</a></p>

</li>

Expand Down
42 changes: 26 additions & 16 deletions source
Expand Up @@ -2273,7 +2273,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<dd>

<p>The following terms are defined in the URL standard: <a href="#refsURL">[URL]</a></p>
<p>The following terms are defined in the WHATWG URL standard: <a href="#refsURL">[URL]</a></p>

<ul class="brief">
<li><dfn>URL</dfn>
Expand All @@ -2298,6 +2298,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn>UTF-8 percent encode</dfn>
<li><dfn>Percent decode</dfn>
<li><dfn>Decoder error</dfn>
<li>The <dfn>domain label to ASCII</dfn> algorithm</li>
<li>The <dfn>domain label to Unicode</dfn> algorithm</li>
<li><dfn><code>URLUtils</code></dfn> interface
<li><dfn><code>URLUtilsReadOnly</code></dfn> interface
<li><dfn data-x="dom-url-href"><code>href</code> attribute</dfn>
Expand Down Expand Up @@ -73092,10 +73094,11 @@ x === this; // true</pre>

<li><p>Append the string "<code data-x="">://</code>" to <var data-x="">result</var>.</p></li>

<li><p>Apply the IDNA ToUnicode algorithm to each component of the host part of the
<!--CLEANUP-->
<li><p>Apply the <span>domain label to Unicode</span> algorithm to each component of the host part of the
<span>origin</span> tuple, and append the results &mdash; each component, in the same order,
separated by U+002E FULL STOP characters (.) &mdash; to <var data-x="">result</var>. <a
href="#refsRFC3490">[RFC3490]</a></p></li> <!--XXX-23005-->
href="#refsURL">[URL]</a></p></li>

<li><p>If the port part of the <span>origin</span> tuple gives a port that is different from the
default port for the protocol given by the scheme part of the <span>origin</span> tuple, then
Expand All @@ -73122,13 +73125,15 @@ x === this; // true</pre>

<li>

<p>Apply the IDNA ToASCII algorithm to the host part of the <span>origin</span> tuple, with both
the AllowUnassigned and UseSTD3ASCIIRules flags set, and append the results to <var
data-x="">result</var>.</p> <!--XXX-23005-->
<p>Apply the <span>domain label to ASCII</span> algorithm to each component of the host part of
the <span>origin</span> tuple, and append the results &mdash; each component, in the same order,
separated by U+002E FULL STOP characters (.) &mdash; to <var data-x="">result</var>. <a
href="#refsURL">[URL]</a></p>

<p>If ToASCII fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then return the empty string and abort these steps.
<a href="#refsRFC3490">[RFC3490]</a></p>
<!--CLEANUP-->
<p>If the ToASCII algorithm used by the <span>domain label to ASCII</span> algorithm fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then throw a <code>SecurityError</code> exception and
abort these steps. <a href="#refsRFC3490">[RFC3490]</a></p>

</li>

Expand Down Expand Up @@ -73227,11 +73232,16 @@ x === this; // true</pre>
<li>

<p>If the new value is an IPv4 or IPv6 address, let <var data-x="">new value</var> be the new
value. Otherwise, apply the IDNA ToASCII algorithm to the new value, with both the
AllowUnassigned and UseSTD3ASCIIRules flags set, and let <var data-x="">new value</var> be the
result of the ToASCII algorithm.</p> <!--XXX-23005-->
value.</p>

<p>Otherwise, <span data-x="strictly split a string">strictly split</span> the new value on
U+002E FULL STOP characters (.), apply the <span>domain label to ASCII</span> algorithm to each
returned token, and let <var data-x="">new value</var> be the result of concatenating the
results of applying that algorithm to each token, in the same order, separated by U+002E FULL
STOP characters (.). <a href="#refsURL">[URL]</a></p>

<p>If ToASCII fails to convert one of the components of the string, e.g. because it is too long
<!--CLEANUP-->
<p>If the ToASCII algorithm used by the <span>domain label to ASCII</span> algorithm fails to convert one of the components of the string, e.g. because it is too long
or because it contains invalid characters, then throw a <code>SecurityError</code> exception and
abort these steps. <a href="#refsRFC3490">[RFC3490]</a></p>

Expand Down Expand Up @@ -73273,9 +73283,9 @@ x === this; // true</pre>
the Public Suffix List, then throw a <code>SecurityError</code> exception and abort these
steps. <a href="#refsPSL">[PSL]</a></p>

<p>Suffixes must be compared after applying the IDNA ToASCII algorithm to them, with both the
AllowUnassigned and UseSTD3ASCIIRules flags set, in an <span>ASCII case-insensitive</span>
manner. <a href="#refsRFC3490">[RFC3490]</a></p> <!--XXX-23005-->
<p>Suffixes must be compared in an <span>ASCII case-insensitive</span> manner, after applying
the <span>domain label to ASCII</span> algorithm to their individual components, . <a
href="#refsURL">[URL]</a></p>

</li>

Expand Down

0 comments on commit 21d0bbd

Please sign in to comment.