Skip to content

Commit

Permalink
Fix entity errors
Browse files Browse the repository at this point in the history
Named character references in attributes whose last character is not `;`
and for which the next input character is `=` (or ASCII alphanumeric,
but this isn't tested here), flushes the code points consumed as a
character reference _without_ adding a parse error.

Named character references not in attributes whose last character is not
`;` are errors, regardless of the following character as noted in the
`#new-errors` section but without an entry in `#errors`, the number of
errors are wrong. (See
html5lib#107).

Separately, this adds the missing expected-doctype-but-got-start-tag
error.
  • Loading branch information
stevecheckoway committed Oct 3, 2018
1 parent 6f7ba44 commit 538eeaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tree-construction/entities02.dat
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#data
<div bar="ZZ&gt=YY"></div>
#errors
(1,15): named-entity-without-semicolon
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
Expand Down Expand Up @@ -204,7 +203,6 @@
#data
<div bar="ZZ&pound=23"></div>
#errors
(1,18): named-entity-without-semicolon
(1,23): expected-doctype-but-got-start-tag
#document
| <html>
Expand Down Expand Up @@ -299,6 +297,8 @@
#data
<div>ZZ&AElig=</div>
#errors
(1,5): expected-doctype-but-got-start-tag
(1:14) missing-semicolon-after-character-reference
#new-errors
(1:14) missing-semicolon-after-character-reference
#document
Expand Down

0 comments on commit 538eeaa

Please sign in to comment.