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

HTML API: Stop proceeding HTML when encountering unsupported markup. #5048

Conversation

dmsnell
Copy link
Contributor

@dmsnell dmsnell commented Aug 22, 2023

Trac ticket: #59167-trac

It was a design goal of the HTML Processor to abort processing its input document when encountering unsupported markup. Unfortunately there was no test for this and so-far, the HTML Processor has paused, but continued processing in these situations.

In this patch a new test ensures that the HTML Processor stops and refuses to move forward after encountering any unsupported markup. It also ensures that it doesn't report any current tag names since unsupported markup could imply that the read tag name is different than the parsed tag name.

It was a design goal of the HTML Processor to abort processing its input document
when encountering unsupported markup. Unfortunately there was no test for
this and so-far, the HTML Processor has paused, but continued processing in
these situations.

In this patch a new test ensures that the HTML Processor stops and refuses to
move forward after encountering any unsupported markup. It also ensures that
it doesn't report any current tag names since unsupported markup could imply
that the read tag name is different than the parsed tag name.
dmsnell added a commit to WordPress/gutenberg that referenced this pull request Aug 22, 2023
…ted markup

WordPress/wordpress-develop#5048 fixes a bug where the HTML Processor continues
to process input HTML once it encounters unsupported markup, which it shouldn't.
It should stop and abort all processing.
Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚢

@ockham
Copy link
Contributor

ockham commented Aug 30, 2023

Committed to Core in https://core.trac.wordpress.org/changeset/56493.

@ockham ockham closed this Aug 30, 2023
@dmsnell dmsnell deleted the html-api/fix-stop-after-unsupported-html branch August 30, 2023 16:17
dmsnell added a commit to WordPress/gutenberg that referenced this pull request Sep 1, 2023
…ted markup

WordPress/wordpress-develop#5048 fixes a bug where the HTML Processor continues
to process input HTML once it encounters unsupported markup, which it shouldn't.
It should stop and abort all processing.
dmsnell added a commit to WordPress/gutenberg that referenced this pull request Sep 5, 2023
…ted markup

WordPress/wordpress-develop#5048 fixes a bug where the HTML Processor continues
to process input HTML once it encounters unsupported markup, which it shouldn't.
It should stop and abort all processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants