Skip to content

Commit

Permalink
[t] (1) Make the processing of '<' characters in attributes while doi…
Browse files Browse the repository at this point in the history
…ng the encoding-scan parse match the behaviour of the main parser. Also, various minor editorial fixes.

git-svn-id: http://svn.whatwg.org/webapps@1265 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 27, 2008
1 parent 29aee6e commit 4498a77
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 52 deletions.
41 changes: 15 additions & 26 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -38070,15 +38070,15 @@ function receiver(e) {

<dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or
0x65, 0x54 or 0x74, 0x41 or 0x61, and finally one of 0x09, 0x0A,
0x0B, 0x0C, 0x0D, 0x20 (case-insensitive ASCII '&lt;meta' followed by
a space)
0x0B, 0x0C, 0x0D, 0x20, 0x2F (case-insensitive ASCII '&lt;meta'
followed by a space or slash)

<dd>
<ol>
<li>
<p>Advance the <var title="">position</var> pointer so that it
points at the next 0x09, 0x0A, 0x0B, 0x0C, 0x0D, or 0x20 byte (the
one in sequence of characters matched above).
points at the next 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x20, or 0x2F
byte (the one in sequence of characters matched above).

<li>
<p><a href="#get-an" title=concept-get-attributes-when-sniffing>Get
Expand Down Expand Up @@ -38141,12 +38141,8 @@ function receiver(e) {
<li>
<p>Advance the <var title="">position</var> pointer so that it
points at the next 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII
VT), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), 0x3E
(ASCII '>'), 0x3C (ASCII '&lt;') byte.

<li>
<p>If the pointer points to a 0x3C (ASCII '&lt;') byte, then return
to the first step in the overall "two step" algorithm.
VT), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E
(ASCII '>') byte.

<li>
<p>Repeatedly <a href="#get-an"
Expand Down Expand Up @@ -38186,12 +38182,7 @@ function receiver(e) {
<p>If the byte at <var title="">position</var> is one of 0x09 (ASCII
TAB), 0x0A (ASCII LF), 0x0B (ASCII VT), 0x0C (ASCII FF), 0x0D (ASCII
CR), 0x20 (ASCII space), or 0x2F (ASCII '/') then advance <var
title="">position</var> to the next byte and start over.

<li>
<p>If the byte at <var title="">position</var> is 0x3C (ASCII '&lt;'),
then move <var title="">position</var> back to the previous byte, and
stop looking for an attribute. There isn't one.
title="">position</var> to the next byte and redo this substep.

<li>
<p>If the byte at <var title="">position</var> is 0x3E (ASCII '>'),
Expand All @@ -38218,8 +38209,7 @@ function receiver(e) {

<dd>Jump to the step below labelled <em>spaces</em>.

<dt>If it is 0x2F (ASCII '/'), 0x3C (ASCII '&lt;'), or 0x3E (ASCII
'&gt;')
<dt>If it is 0x2F (ASCII '/') or 0x3E (ASCII '>')

<dd>Stop looking for an attribute. The attribute's name is the value
of <var title="">attribute name</var>, its value is the empty string.
Expand Down Expand Up @@ -38298,7 +38288,7 @@ function receiver(e) {
<li>Return to the second step in these substeps.
</ol>

<dt>If it is 0x3C (ASCII '&lt;'), or 0x3E (ASCII '&gt;')
<dt>If it is 0x3E (ASCII '>')

<dd>Stop looking for an attribute. The attribute's name is the value
of <var title="">attribute name</var>, its value is the empty string.
Expand All @@ -38322,8 +38312,7 @@ function receiver(e) {

<dl class=switch>
<dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT), 0x0C
(ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), 0x3C (ASCII '&lt;'),
or 0x3E (ASCII '&gt;')
(ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E (ASCII '>')

<dd>Stop looking for an attribute. The attribute's name is the value
of <var title="">attribute name</var> and its value is the value of
Expand Down Expand Up @@ -38434,7 +38423,7 @@ function receiver(e) {
REPLACEMENT CHARACTERs. Any occurrences of such characters is a <a
href="#parse0">parse error</a>.

<p>Any occurances of any characters in the ranges U+0001 to U+0008,
<p>Any occurrences of any characters in the ranges U+0001 to U+0008,
<!-- space characters allowed --> U+000E to U+001F, <!-- ASCII
allowed -->
U+007F <!--to U+0084, (U+0085 NEL not allowed),
Expand Down Expand Up @@ -43793,13 +43782,13 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
</ol>

<p><dfn id=escapingString>Escaping a string</dfn> (for the purposes of the
algorithm above) consists of replacing any occurances of the "<code
algorithm above) consists of replacing any occurrences of the "<code
title="">&amp;</code>" character by the string "<code
title="">&amp;amp;</code>", any occurances of the "<code
title="">&amp;amp;</code>", any occurrences of the "<code
title="">&lt;</code>" character by the string "<code
title="">&amp;lt;</code>", any occurances of the "<code
title="">&amp;lt;</code>", any occurrences of the "<code
title="">&gt;</code>" character by the string "<code
title="">&amp;gt;</code>", and any occurances of the "<code
title="">&amp;gt;</code>", and any occurrences of the "<code
title="">&quot;</code>" character by the string "<code
title="">&amp;quot;</code>".

Expand Down
41 changes: 15 additions & 26 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -35597,14 +35597,14 @@ function receiver(e) {

</dd>

<dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or 0x65, 0x54 or 0x74, 0x41 or 0x61, and finally one of 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x20 (case-insensitive ASCII '&lt;meta' followed by a space)</dt>
<dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or 0x65, 0x54 or 0x74, 0x41 or 0x61, and finally one of 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x20, 0x2F (case-insensitive ASCII '&lt;meta' followed by a space or slash)</dt>
<dd>

<ol>

<li><p>Advance the <var title="">position</var> pointer so
that it points at the next 0x09, 0x0A, 0x0B, 0x0C, 0x0D, or
0x20 byte (the one in sequence of characters matched
that it points at the next 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
0x20, or 0x2F byte (the one in sequence of characters matched
above).</p></li>

<li><p><span title="concept-get-attributes-when-sniffing">Get
Expand Down Expand Up @@ -35672,12 +35672,7 @@ function receiver(e) {
<li><p>Advance the <var title="">position</var> pointer so
that it points at the next 0x09 (ASCII TAB), 0x0A (ASCII LF),
0x0B (ASCII VT), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20
(ASCII space), 0x3E (ASCII '>'), 0x3C (ASCII '&lt;')
byte.</p></li>

<li><p>If the pointer points to a 0x3C (ASCII '&lt;') byte, then
return to the first step in the overall "two step"
algorithm.</p></li>
(ASCII space), or 0x3E (ASCII '>') byte.</p></li>

<li><p>Repeatedly <span
title="concept-get-attributes-when-sniffing">get an
Expand Down Expand Up @@ -35726,13 +35721,8 @@ function receiver(e) {
<li><p>If the byte at <var title="">position</var> is one of 0x09
(ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT), 0x0C (ASCII FF),
0x0D (ASCII CR), 0x20 (ASCII space), or 0x2F (ASCII '/') then
advance <var title="">position</var> to the next byte and start
over.</p></li>

<li><p>If the byte at <var title="">position</var> is 0x3C (ASCII
'&lt;'), then move <var title="">position</var> back to the
previous byte, and stop looking for an attribute. There isn't
one.</p></li>
advance <var title="">position</var> to the next byte and redo
this substep.</p></li>

<li><p>If the byte at <var title="">position</var> is 0x3E (ASCII
'>'), then stop looking for an attribute. There isn't
Expand Down Expand Up @@ -35760,8 +35750,7 @@ function receiver(e) {

<dd>Jump to the step below labelled <em>spaces</em>.</dd>

<dt>If it is 0x2F (ASCII '/'), 0x3C (ASCII '&lt;'), or 0x3E
(ASCII '&gt;')</dt>
<dt>If it is 0x2F (ASCII '/') or 0x3E (ASCII '>')</dt>

<dd>Stop looking for an attribute. The attribute's name is the
value of <var title="">attribute name</var>, its value is the
Expand Down Expand Up @@ -35853,7 +35842,7 @@ function receiver(e) {

</dd>

<dt>If it is 0x3C (ASCII '&lt;'), or 0x3E (ASCII '&gt;')</dt>
<dt>If it is 0x3E (ASCII '>')</dt>

<dd>Stop looking for an attribute. The attribute's name is the
value of <var title="">attribute name</var>, its value is the
Expand Down Expand Up @@ -35884,8 +35873,8 @@ function receiver(e) {
<dl class="switch">

<dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII
VT), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), 0x3C
(ASCII '&lt;'), or 0x3E (ASCII '&gt;')</dt>
VT), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or
0x3E (ASCII '>')</dt>

<dd>Stop looking for an attribute. The attribute's name is the
value of <var title="">attribute name</var> and its value is the
Expand Down Expand Up @@ -36002,7 +35991,7 @@ function receiver(e) {
U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such characters is
a <span>parse error</span>.</p>

<p>Any occurances of any characters in the ranges U+0001 to U+0008,
<p>Any occurrences of any characters in the ranges U+0001 to U+0008,
<!-- space characters allowed --> U+000E to U+001F, <!-- ASCII
allowed --> U+007F <!--to U+0084, (U+0085 NEL not allowed),
U+0086--> to U+009F, U+D800 to U+DFFF <!-- surrogates not allowed
Expand Down Expand Up @@ -41159,12 +41148,12 @@ http://lxr.mozilla.org/seamonkey/search?string=nested

<p><dfn id="escapingString">Escaping a string</dfn> (for the
purposes of the algorithm above) consists of replacing any
occurances of the "<code title="">&amp;</code>" character by the
string "<code title="">&amp;amp;</code>", any occurances of the
occurrences of the "<code title="">&amp;</code>" character by the
string "<code title="">&amp;amp;</code>", any occurrences of the
"<code title="">&lt;</code>" character by the string "<code
title="">&amp;lt;</code>", any occurances of the "<code
title="">&amp;lt;</code>", any occurrences of the "<code
title="">&gt;</code>" character by the string "<code
title="">&amp;gt;</code>", and any occurances of the "<code
title="">&amp;gt;</code>", and any occurrences of the "<code
title="">&quot;</code>" character by the string "<code
title="">&amp;quot;</code>".</p>

Expand Down

0 comments on commit 4498a77

Please sign in to comment.