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

Parser improperly handles optional tags under html5 rules #20

Open
tysonzero opened this issue Sep 14, 2021 · 0 comments
Open

Parser improperly handles optional tags under html5 rules #20

tysonzero opened this issue Sep 14, 2021 · 0 comments

Comments

@tysonzero
Copy link

https://html.spec.whatwg.org/multipage/syntax.html#optional-tags

Minimal incorrect example:

-- current
sanitizeBalance "<td>foo<td>bar" == "<td>foo<td>bar</td></td>"

-- correct
sanitizeBalance "<td>foo<td>bar" == "<td>foo</td><td>bar</td>"

-- potentially an option depending on semantics of "balanced"
sanitizeBalance "<td>foo<td>bar" == "<td>foo<td>bar"

If html4 / xhtml5 sanitizing is also desired then separate functions/modules may be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant