U+0000 is now a parse error in bogus comment and bogus DOCTYPE states

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
html, java
Domain
tooling

Research direction

Start by reading WHATWG HTML pull request 2939 and reproduce the example in the HTML5 parser checker with <!%00>. Trace where U+0000 is handled in preprocessing, tokenization, and tree building. Done means the parser follows the specified handling for bogus comment and bogus DOCTYPE states, including the expected parse-error behavior.

Written by the indexing model from the issue text.

Description

Consider implementing https://github.com/whatwg/html/pull/2939

Experimenting with https://checker.html5.org/parsetree/?parser=html5&content=<!%00>&submit=Print+Tree it seems currently the U+0000 check is in the preprocessing step, and not in the tokenizer. In the spec it was removed from the preprocessing since it needs different handling in the tokenizer/tree builder for different contexts, IIRC. But with the latest spec change it ought to be equivalent in terms of how many errors are produced for a given input, the difference could be relative order of errors.

Anyway I thought I'd file this as a heads-up at least.

Dominant language
Java
Stars
65
Forks
29
Avg merge
11d 21h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from validator/htmlparser

All issues in validator/htmlparser

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.