Skip to content

Commit 12c75fa

Browse files
committed
Add Script data double escaped state errors.
1 parent 5cc258e commit 12c75fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/tokenizer/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,11 +1195,15 @@ _[SCRIPT_DATA_DOUBLE_ESCAPED_STATE] = function scriptDataDoubleEscapedState(cp)
11951195
this._emitChars('<');
11961196
}
11971197

1198-
else if (cp === $.NULL)
1198+
else if (cp === $.NULL) {
1199+
this._err(ERR.unexpectedNullCharacter);
11991200
this._emitChars(UNICODE.REPLACEMENT_CHARACTER);
1201+
}
12001202

1201-
else if (cp === $.EOF)
1203+
else if (cp === $.EOF) {
1204+
this._err(ERR.eofInScriptHtmlComment);
12021205
this._emitEOFToken();
1206+
}
12031207

12041208
else
12051209
this._emitCodePoint(cp);

0 commit comments

Comments
 (0)