Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up_inputstream.EncodingParser fails to parse short bogus comments (prescan) #427
Comments
|
Confirmed the spec says to treat them as comments. |


I think
abrupt-closing-of-empty-comment('<!-->'and'<!--->')should be treated as normal comments in prescan as well.
for
'<!-->', the spec states rather explicitly.prescan:
https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding
abrupt-closing-of-empty-comment:
https://html.spec.whatwg.org/multipage/parsing.html#parse-error-abrupt-closing-of-empty-comment
C.f.
jsdom/html-encoding-snifferhas the same bug.jsdom/html-encoding-sniffer#4
Validatortreats them as comments.