Skip to content

Commit 5cc258e

Browse files
committed
Add Script data escaped dash dash state errors.
1 parent b45306a commit 5cc258e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/tokenizer/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,12 +1067,15 @@ _[SCRIPT_DATA_ESCAPED_DASH_DASH_STATE] = function scriptDataEscapedDashDashState
10671067
}
10681068

10691069
else if (cp === $.NULL) {
1070+
this._err(ERR.unexpectedNullCharacter);
10701071
this.state = SCRIPT_DATA_ESCAPED_STATE;
10711072
this._emitChars(UNICODE.REPLACEMENT_CHARACTER);
10721073
}
10731074

1074-
else if (cp === $.EOF)
1075+
else if (cp === $.EOF) {
1076+
this._err(ERR.eofInScriptHtmlComment);
10751077
this._emitEOFToken();
1078+
}
10761079

10771080
else {
10781081
this.state = SCRIPT_DATA_ESCAPED_STATE;

0 commit comments

Comments
 (0)