Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make U+0000 a parse error in bogus comment and bogus DOCTYPE states #2939

Merged
merged 1 commit into from
Aug 22, 2017

Conversation

zcorpan
Copy link
Member

@zcorpan zcorpan commented Aug 17, 2017

Also make sure to reconsume instead of switching to the bogus
DOCTYPE state so that a U+0000 that causes the parser to enter the
bogus DOCTYPE state is itself caught as a parse error.

Fixes #2684.

Tests: html5lib/html5lib-tests#103


@whatwg/html-parser

@inikulin
Copy link
Member

DOCTYPE state so that a U+0000 that causes the parser to enter the
bogus DOCTYPE state is itself caught as a parse error.

Shouldn't we do the same for bogus comments that come from "Anything else" branch of End tag open state?

@zcorpan
Copy link
Member Author

zcorpan commented Aug 18, 2017

That already says to reconsume in the bogus comment state.

@inikulin
Copy link
Member

Indeed. lgtm then.

@zcorpan zcorpan added the needs tests Moving the issue forward requires someone to write tests label Aug 18, 2017
zcorpan added a commit to html5lib/html5lib-tests that referenced this pull request Aug 18, 2017
zcorpan added a commit to html5lib/html5lib-tests that referenced this pull request Aug 18, 2017
zcorpan added a commit to html5lib/html5lib-tests that referenced this pull request Aug 22, 2017
@zcorpan zcorpan removed the needs tests Moving the issue forward requires someone to write tests label Aug 22, 2017
Also make sure to reconsume instead of switching to the bogus
DOCTYPE state so that a U+0000 that causes the parser to enter the
bogus DOCTYPE state is itself caught as a parse error.

Fixes #2684.

Tests: html5lib/html5lib-tests#103
@zcorpan zcorpan force-pushed the zcorpan/parse-error-null-bogus-states branch from 8ab7474 to 9d4cc4f Compare August 22, 2017 09:39
@zcorpan
Copy link
Member Author

zcorpan commented Aug 22, 2017

Tests are now merged: html5lib/html5lib-tests#103
Implementation in parse5 by @inikulin HTMLParseErrorWG/parse5#28

This PR can be merged when checks have completed.

@zcorpan zcorpan merged commit 5a6fef5 into master Aug 22, 2017
@zcorpan zcorpan deleted the zcorpan/parse-error-null-bogus-states branch August 22, 2017 14:55
JonathanO added a commit to JonathanO/html-tokenizer that referenced this pull request Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants