Skip to content

Commit 98567c1

Browse files
committed
[act] (2) Fix the definition of ambiguous ampersand, and allow quoted attributes to end in ampersands.
git-svn-id: http://svn.whatwg.org/webapps@1296 340c8d12-0b0e-0410-8428-c7bf67bfef74
1 parent 443384e commit 98567c1

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

index

+14-8
Original file line numberDiff line numberDiff line change
@@ -37885,10 +37885,9 @@ function receiver(e) {
3788537885

3788637886
<p>An <dfn id=ambiguous title=syntax-ambiguous-ampersand>ambiguous
3788737887
ampersand</dfn> is a U+0026 AMPERSAND (<code>&amp;</code>) character that
37888-
is not the last character in the file, that is not followed by a <a
37889-
href="#space">space character</a>, that is not followed by a start tag
37890-
that has not been omitted, and that is not followed by another U+0026
37891-
AMPERSAND (<code>&amp;</code>) character.
37888+
is followed by some <a href="#text1" title=syntax-text>text</a> other than
37889+
a <a href="#space">space character</a>, a U+003C LESS-THAN SIGN character
37890+
('&lt'), or another U+0026 AMPERSAND (<code>&amp;</code>) character.
3789237891

3789337892
<h4 id=comments><span class=secno>8.1.5 </span>Comments</h4>
3789437893

@@ -38722,7 +38721,8 @@ function receiver(e) {
3872238721
<p><em>(This cannot happen if the <a href="#content2">content model
3872338722
flag</a> is set to the CDATA state.)</em></p>
3872438723

38725-
<p>Attempt to <a href="#consume">consume an entity</a>.</p>
38724+
<p>Attempt to <a href="#consume">consume an entity</a>, with no <a
38725+
href="#additional">additional allowed character</a>.</p>
3872638726

3872738727
<p>If nothing is returned, emit a U+0026 AMPERSAND character token.</p>
3872838728

@@ -39154,7 +39154,8 @@ function receiver(e) {
3915439154
<dt>U+0026 AMPERSAND (&amp;)
3915539155

3915639156
<dd>Switch to the <a href="#entity0">entity in attribute value
39157-
state</a>.
39157+
state</a>, with the <a href="#additional">additional allowed
39158+
character</a> being U+0022 QUOTATION MARK (&quot;).
3915839159

3915939160
<dt>EOF
3916039161

@@ -39181,7 +39182,8 @@ function receiver(e) {
3918139182
<dt>U+0026 AMPERSAND (&amp;)
3918239183

3918339184
<dd>Switch to the <a href="#entity0">entity in attribute value
39184-
state</a>.
39185+
state</a>, with the <a href="#additional">additional allowed
39186+
character</a> being U+0027 APOSTROPHE (').
3918539187

3918639188
<dt>EOF
3918739189

@@ -39217,7 +39219,8 @@ function receiver(e) {
3921739219
<dt>U+0026 AMPERSAND (&amp;)
3921839220

3921939221
<dd>Switch to the <a href="#entity0">entity in attribute value
39220-
state</a>.
39222+
state</a>, with no <a href="#additional">additional allowed
39223+
character</a>.
3922139224

3922239225
<dt>U+003E GREATER-THAN SIGN (&gt;)
3922339226

@@ -39942,6 +39945,9 @@ function receiver(e) {
3994239945

3994339946
<dt>EOF
3994439947

39948+
<dt>The <dfn id=additional>additional allowed character</dfn>, if there is
39949+
one
39950+
3994539951
<dd>Not an entity. No characters are consumed, and nothing is returned.
3994639952
(This is not an error, either.)
3994739953

source

+15-8
Original file line numberDiff line numberDiff line change
@@ -35397,10 +35397,10 @@ function receiver(e) {
3539735397

3539835398
<p>An <dfn title="syntax-ambiguous-ampersand">ambiguous
3539935399
ampersand</dfn> is a U+0026 AMPERSAND (<code>&amp;</code>) character
35400-
that is not the last character in the file, that is not followed by
35401-
a <span>space character</span>, that is not followed by a start tag
35402-
that has not been omitted, and that is not followed by another
35403-
U+0026 AMPERSAND (<code>&amp;</code>) character.</p>
35400+
that is followed by some <span title="syntax-text">text</span> other
35401+
than a <span>space character</span>, a U+003C LESS-THAN SIGN
35402+
character ('&lt'), or another U+0026 AMPERSAND (<code>&amp;</code>)
35403+
character.</p>
3540435404

3540535405

3540635406
<h4>Comments</h4>
@@ -36286,7 +36286,8 @@ function receiver(e) {
3628636286
<p><em>(This cannot happen if the <span>content model flag</span>
3628736287
is set to the CDATA state.)</em></p>
3628836288

36289-
<p>Attempt to <span>consume an entity</span>.</p>
36289+
<p>Attempt to <span>consume an entity</span>, with no
36290+
<span>additional allowed character</span>.</p>
3629036291

3629136292
<p>If nothing is returned, emit a U+0026 AMPERSAND character
3629236293
token.</p>
@@ -36691,7 +36692,9 @@ function receiver(e) {
3669136692
<dd>Switch to the <span>before attribute name state</span>.</dd>
3669236693

3669336694
<dt>U+0026 AMPERSAND (&amp;)</dt>
36694-
<dd>Switch to the <span>entity in attribute value state</span>.</dd>
36695+
<dd>Switch to the <span>entity in attribute value state</span>,
36696+
with the <span>additional allowed character</span> being U+0022
36697+
QUOTATION MARK (&quot;).</dd>
3669536698

3669636699
<dt>EOF</dt>
3669736700
<dd><span>Parse error</span>. Emit the current tag
@@ -36719,7 +36722,9 @@ function receiver(e) {
3671936722
<dd>Switch to the <span>before attribute name state</span>.</dd>
3672036723

3672136724
<dt>U+0026 AMPERSAND (&amp;)</dt>
36722-
<dd>Switch to the <span>entity in attribute value state</span>.</dd>
36725+
<dd>Switch to the <span>entity in attribute value state</span>,
36726+
with the <span>additional allowed character</span> being U+0027
36727+
APOSTROPHE (').</dd>
3672336728

3672436729
<dt>EOF</dt>
3672536730
<dd><span>Parse error</span>. Emit the current tag
@@ -36752,7 +36757,8 @@ function receiver(e) {
3675236757
<dd>Switch to the <span>before attribute name state</span>.</dd>
3675336758

3675436759
<dt>U+0026 AMPERSAND (&amp;)</dt>
36755-
<dd>Switch to the <span>entity in attribute value state</span>.</dd>
36760+
<dd>Switch to the <span>entity in attribute value state</span>,
36761+
with no <span>additional allowed character</span>.</dd>
3675636762

3675736763
<dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
3675836764
<dd>Emit the current tag token. Switch to the <span>data
@@ -37453,6 +37459,7 @@ function receiver(e) {
3745337459
<dt>U+003C LESS-THAN SIGN</dt>
3745437460
<dt>U+0026 AMPERSAND</dt>
3745537461
<dt>EOF</dt>
37462+
<dt>The <dfn>additional allowed character</dfn>, if there is one</dt>
3745637463

3745737464
<dd>Not an entity. No characters are consumed, and nothing is
3745837465
returned. (This is not an error, either.)</dd>

0 commit comments

Comments
 (0)