-
Notifications
You must be signed in to change notification settings - Fork 3.2k
HTML API: Fix unclosed funky comment bug #7146
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
HTML API: Fix unclosed funky comment bug #7146
Conversation
A state change was missing when the input is too short to find a comment closer in an opened funky comment. This fixes a issue where `</#` does not correctly report incomplete input, but `</# ` does.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
dmsnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good find. Thank you @sirreal
…pause. A state change was missing in the Tag Processor when the input is too short to find a comment closer after an opened funky comment. This patch fixes a issue where `</#` does not correctly report incomplete input, but `</# ` does. Developed in #7146 Discussed in https://core.trac.wordpress.org/ticket/61831 Props: jonsurrell. Fixes #61831. git-svn-id: https://develop.svn.wordpress.org/trunk@58858 602fd350-edb4-49c9-b593-d223f7449a82
…pause. A state change was missing in the Tag Processor when the input is too short to find a comment closer after an opened funky comment. This patch fixes a issue where `</#` does not correctly report incomplete input, but `</# ` does. Developed in WordPress/wordpress-develop#7146 Discussed in https://core.trac.wordpress.org/ticket/61831 Props: jonsurrell. Fixes #61831. Built from https://develop.svn.wordpress.org/trunk@58858 git-svn-id: http://core.svn.wordpress.org/trunk@58254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…pause. A state change was missing in the Tag Processor when the input is too short to find a comment closer after an opened funky comment. This patch fixes a issue where `</#` does not correctly report incomplete input, but `</# ` does. Developed in WordPress/wordpress-develop#7146 Discussed in https://core.trac.wordpress.org/ticket/61831 Props: jonsurrell. Fixes #61831. Built from https://develop.svn.wordpress.org/trunk@58858 git-svn-id: https://core.svn.wordpress.org/trunk@58254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…pause. A state change was missing in the Tag Processor when the input is too short to find a comment closer after an opened funky comment. This patch fixes a issue where `</#` does not correctly report incomplete input, but `</# ` does. Developed in WordPress#7146 Discussed in https://core.trac.wordpress.org/ticket/61831 Props: jonsurrell. Fixes #61831. git-svn-id: https://develop.svn.wordpress.org/trunk@58858 602fd350-edb4-49c9-b593-d223f7449a82
</#is not treated as incomplete input but</#is. Both should be incomplete input.The HTML Tag Processor may report ::paused_at_incomplete_token() === true correctly when the HTML ends in an open "funky comment."
The HTML </# should be handled the same as </# , in both cases a funky comment has been opened but no closer is found before the HTML document ends. Both cases should both be treated as incomplete input, however the former case (with no trailing space) does not report an incomplete token.
Trac ticket: https://core.trac.wordpress.org/ticket/61831
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.