File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module.exports = {
10
10
startOfProcessingInstructionOrXMLDeclaration : 'start-of-processing-instruction-or-xml-declaration' ,
11
11
unexpectedFirstCharacterOfStartTagName : 'unexpected-first-character-of-start-tag-name' ,
12
12
missingEndTagName : 'missing-end-tag-name' ,
13
+ eofInTagName : 'eof-in-tag-name' ,
13
14
eofBeforeEndTagName : 'eof-before-end-tag-name' ,
14
15
cdataInHtmlContent : 'cdata-in-html-content' ,
15
16
malformedComment : 'malformed-comment' ,
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 . eofInTagName ) ;
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