Skip to content
Permalink
Browse files

[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 21d0bbda012778af81d4b6dfa02b1326579675b0
Showing with 76 additions and 48 deletions.
  1. +25 −16 complete.html
  2. +25 −16 index
  3. +26 −16 source

<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>

<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>
<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>

<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

<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>

<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>

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>

41 index

<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>

<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>
<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>

<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

<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>

<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>

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>

42 source

<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>
<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>

<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

<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>

<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>

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>

0 comments on commit 21d0bbd

Please sign in to comment.
You can’t perform that action at this time.