Skip to content

Commit

Permalink
[ct] (2) Update to the rules for handling of entities (require semico…
Browse files Browse the repository at this point in the history
…lons, and some changes for parsing entities without semicolons when in attributes).

git-svn-id: http://svn.whatwg.org/webapps@946 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 22, 2007
1 parent 09b41b1 commit 5cef9e0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
26 changes: 18 additions & 8 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -32748,9 +32748,9 @@ function receiver(e) {
<dt>Named entities

<dd>The ampersand must be followed by one of the names given in the <a
href="#entities0">entities</a> section, using the same case. <!--Finally,
after the name, the entity must be terminated by a U+003B SEMICOLON
character (<code title="">;</code>).-->
href="#entities0">entities</a> section, using the same case. The name
must be one that is terminated by a U+003B SEMICOLON (<code
title="">;</code>) character.

<dt>Decimal numeric entities

Expand Down Expand Up @@ -35060,11 +35060,21 @@ function receiver(e) {

<p>If no match can be made, then this is a <a href="#parse">parse
error</a>. No characters are consumed, and nothing is returned.</p>
<!--<p>If the last character matched is not a U+003B SEMICOLON,
there is a <span>parse error</span>.</p>-->

<p>Return a character token for the character corresponding to the entity
name (as given by the second column of the <a

<p>If the last character matched is not a U+003B SEMICOLON (<code
title="">;</code>), there is a <a href="#parse">parse error</a>.</p>

<p>If the entity is being consumed <a href="#entity0" title="entity in
attribute value state">as part of an attribute</a>, and the last
character matched is not a U+003B SEMICOLON (<code title="">;</code>),
and the next character is in the range U+0030 DIGIT ZERO to U+0039 DIGIT
NINE, U+0041 LATIN CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z, or
U+0061 LATIN SMALL LETTER A to U+007A LATIN SMALL LETTER Z, then, for
historical reasons, all the characters that were matched after the
U+0026 AMPERSAND (&amp;) must be unconsumed, and nothing is returned.</p>

<p>Otherwise, return a character token for the character corresponding to
the entity name (as given by the second column of the <a
href="#entities0">entities</a> table).</p>

<div class=example>
Expand Down
28 changes: 19 additions & 9 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -30243,9 +30243,9 @@ function receiver(e) {
<dt>Named entities</dt>

<dd>The ampersand must be followed by one of the names given in the
<span>entities</span> section, using the same case. <!--Finally,
after the name, the entity must be terminated by a U+003B SEMICOLON
character (<code title="">;</code>).--></dd>
<span>entities</span> section, using the same case. The name must
be one that is terminated by a U+003B SEMICOLON (<code
title="">;</code>) character.</dd>


<dt>Decimal numeric entities</dt>
Expand Down Expand Up @@ -32376,12 +32376,22 @@ function receiver(e) {
error</span>. No characters are consumed, and nothing is
returned.</p>

<!--<p>If the last character matched is not a U+003B SEMICOLON,
there is a <span>parse error</span>.</p>-->

<p>Return a character token for the character corresponding to the
entity name (as given by the second column of the
<span>entities</span> table).</p>
<p>If the last character matched is not a U+003B SEMICOLON (<code
title="">;</code>), there is a <span>parse error</span>.</p>

<p>If the entity is being consumed <span title="entity in
attribute value state">as part of an attribute</span>, and the
last character matched is not a U+003B SEMICOLON (<code
title="">;</code>), and the next character is in the range U+0030
DIGIT ZERO to U+0039 DIGIT NINE, U+0041 LATIN CAPITAL LETTER A to
U+005A LATIN CAPITAL LETTER Z, or U+0061 LATIN SMALL LETTER A to
U+007A LATIN SMALL LETTER Z, then, for historical reasons, all the
characters that were matched after the U+0026 AMPERSAND (&amp;)
must be unconsumed, and nothing is returned.</p>

<p>Otherwise, return a character token for the character
corresponding to the entity name (as given by the second column of
the <span>entities</span> table).</p>

<div class="example">

Expand Down

0 comments on commit 5cef9e0

Please sign in to comment.