Skip to content

Commit

Permalink
[t] (0) Oops, Unicode characters can be up to six digits hex, not five.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2704 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 24, 2009
1 parent 24f01d7 commit 8e94aa4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions index
Expand Up @@ -52972,15 +52972,14 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
all element and attribute local names that the API wouldn't support
to a set of names that <em>are</em> allowed, by replacing any
character that isn't supported with the uppercase letter U and the
five digits of the character's Unicode codepoint when expressed in
six digits of the character's Unicode codepoint when expressed in
hexadecimal, using digits 0-9 and capital letters A-F as the
symbols, in increasing numeric order.</p>

<p class=example>For example, the element name <code title="">foo&lt;bar</code>, which can be output by the <a href=#html-parser>HTML
parser</a>, though it is neither a legal HTML element name nor a
well-formed XML element name, would be converted into <code title="">fooU0003Cbar</code>, which <em>is</em> a well-formed
XML element name (though it's still not legal in HTML by any
means).</p>
well-formed XML element name, would be converted into <code title="">fooU00003Cbar</code>, which <em>is</em> a well-formed XML
element name (though it's still not legal in HTML by any means).</p>

<p class=example>As another example, consider the attribute
<code>xlink:href</code>. Used on a MathML element, it becomes, after
Expand All @@ -52989,7 +52988,7 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
name "<code title="">href</code>". However, used on an HTML element,
it becomes an attribute with no prefix and the local name "<code title="">xlink:href</code>", which is not a valid NCName, and thus
might not be accepted by an XML API. It could thus get converted,
becoming "<code title="">xlinkU0003Ahref</code>".</p>
becoming "<code title="">xlinkU00003Ahref</code>".</p>

<p class=note>The resulting names from this conversion
conveniently can't clash with any attribute generated by the
Expand Down Expand Up @@ -53024,9 +53023,9 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
<em>after</em> the <a href=#html-parser>HTML parser</a>'s rules have been
applied. For example, a <code title="">&lt;a::&gt;</code> start tag
will be closed by a <code title="">&lt;/a::&gt;</code> end tag, and
never by a <code title="">&lt;/aU0003AU0003A&gt;</code> end tag, even
never by a <code title="">&lt;/aU00003AU00003A&gt;</code> end tag, even
if the user agent is using the rules above to then generate an
actual element in the DOM with the name <code title="">aU0003AU0003A</code> for that start tag.</p>
actual element in the DOM with the name <code title="">aU00003AU00003A</code> for that start tag.</p>



Expand Down
13 changes: 6 additions & 7 deletions source
Expand Up @@ -60322,17 +60322,16 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
all element and attribute local names that the API wouldn't support
to a set of names that <em>are</em> allowed, by replacing any
character that isn't supported with the uppercase letter U and the
five digits of the character's Unicode codepoint when expressed in
six digits of the character's Unicode codepoint when expressed in
hexadecimal, using digits 0-9 and capital letters A-F as the
symbols, in increasing numeric order.</p>

<p class="example">For example, the element name <code
title="">foo&lt;bar</code>, which can be output by the <span>HTML
parser</span>, though it is neither a legal HTML element name nor a
well-formed XML element name, would be converted into <code
title="">fooU0003Cbar</code>, which <em>is</em> a well-formed
XML element name (though it's still not legal in HTML by any
means).</p>
title="">fooU00003Cbar</code>, which <em>is</em> a well-formed XML
element name (though it's still not legal in HTML by any means).</p>

<p class="example">As another example, consider the attribute
<code>xlink:href</code>. Used on a MathML element, it becomes, after
Expand All @@ -60342,7 +60341,7 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
it becomes an attribute with no prefix and the local name "<code
title="">xlink:href</code>", which is not a valid NCName, and thus
might not be accepted by an XML API. It could thus get converted,
becoming "<code title="">xlinkU0003Ahref</code>".</p>
becoming "<code title="">xlinkU00003Ahref</code>".</p>

<p class="note">The resulting names from this conversion
conveniently can't clash with any attribute generated by the
Expand Down Expand Up @@ -60381,10 +60380,10 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
<em>after</em> the <span>HTML parser</span>'s rules have been
applied. For example, a <code title="">&lt;a::></code> start tag
will be closed by a <code title="">&lt;/a::></code> end tag, and
never by a <code title="">&lt;/aU0003AU0003A></code> end tag, even
never by a <code title="">&lt;/aU00003AU00003A></code> end tag, even
if the user agent is using the rules above to then generate an
actual element in the DOM with the name <code
title="">aU0003AU0003A</code> for that start tag.</p>
title="">aU00003AU00003A</code> for that start tag.</p>



Expand Down

0 comments on commit 8e94aa4

Please sign in to comment.