Skip to content

Fail to parse short bogus comments #4

Closed
@openandclose

Description

@openandclose

Even in prescan, abrupt-closing-of-empty-comment should be treated as normal comments.

for <!-->, the spec states rather explicitly.

The two 0x2D bytes can be the same as those in the '<!--' sequence.'

But I think it is also applied to <!--->.

A failure test example, just in case.
https://github.com/openandclose/html-encoding-sniffer/commit/03708654d72139af9e1e5a18ccb829fd19cf61f5

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions