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

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

This comment has been minimized.

Copy link
Member

commented Aug 17, 2017

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

This comment has been minimized.

Copy link
Member Author

commented Aug 18, 2017

That already says to reconsume in the bogus comment state.

@inikulin

This comment has been minimized.

Copy link
Member

commented Aug 18, 2017

Indeed. lgtm then.

@zcorpan zcorpan added the needs 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 label Aug 22, 2017

Make U+0000 a parse error in bogus comment and bogus DOCTYPE states
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 Aug 22, 2017

@zcorpan

This comment has been minimized.

Copy link
Member Author

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@zcorpan zcorpan deleted the zcorpan/parse-error-null-bogus-states branch Aug 22, 2017

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
2 participants
You can’t perform that action at this time.