File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ module.exports = {
7
7
endTagWithAttributes : 'end-tag-with-attributes' ,
8
8
selfClosingEndTag : 'self-closing-end-tag' ,
9
9
unexpectedNullCharacter : 'unexpected-null-character' ,
10
+ unexpectedEofCharacter : 'unexpected-eof-character' ,
10
11
startOfProcessingInstructionOrXMLDeclaration : 'start-of-processing-instruction-or-xml-declaration' ,
11
12
unexpectedFirstCharacterOfStartTagName : 'unexpected-first-character-of-start-tag-name' ,
12
13
missingEndTagName : 'missing-end-tag-name' ,
Original file line number Diff line number Diff line change @@ -748,11 +748,15 @@ _[TAG_NAME_STATE] = function tagNameState(cp) {
748
748
else if ( isAsciiUpper ( cp ) )
749
749
this . currentToken . tagName += toAsciiLowerChar ( cp ) ;
750
750
751
- else if ( cp === $ . NULL )
751
+ else if ( cp === $ . NULL ) {
752
+ this . _err ( ERR . unexpectedNullCharacter ) ;
752
753
this . currentToken . tagName += UNICODE . REPLACEMENT_CHARACTER ;
754
+ }
753
755
754
- else if ( cp === $ . EOF )
756
+ else if ( cp === $ . EOF ) {
757
+ this . _err ( ERR . unexpectedEofCharacter ) ;
755
758
this . _emitEOFToken ( ) ;
759
+ }
756
760
757
761
else
758
762
this . currentToken . tagName += toChar ( cp ) ;
You can’t perform that action at this time.
0 commit comments