-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: Skip over contents of RAWTEXT elements such as STYLE. #5145
HTML API: Skip over contents of RAWTEXT elements such as STYLE. #5145
Conversation
/** | ||
* Skips contents of generic rawtext elements. | ||
* | ||
* @since {VERSION NUMBER} |
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.
* @since {VERSION NUMBER} | |
* @since 6.4.0 |
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.
Unless you'd like it also in 6.3.x, as it qualifies as a bugfix? 🤔
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.
it's definitely a bug-fix, though it looks like I overlooked creating it that way in Trac. if we can get it into 6.3 I would prefer that. the error case is that if someone parses HTML with things that look like HTML tags inside of a STYLE
element or the other RAWTEXT
elements in this patch, then the HTML API will think they are real tags.
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.
Judging from chatter in the #6-3-release-leads
channel, it looks as if there's plans for a 6.3.2. I'll set that as the milestone for the ticket then and will backport the changeset to the 6.3 branch 👍
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.
thanks. I'll make sure to apply this one to the 6.3 compat folder in Gutenberg as well then
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.
f60bab5
to
2e0264f
Compare
When encountering elements that imply switching into the RAWTEXT parsing state, the Tag Processor should skip processing until existing the RAWTEXT state. In this patch the Tag Processor does just that, except for the case of the deprecated XMP element which implies further and more complicated rules. There's an implicit assumption that the SCRIPT ENABLED flag in HTML parsing is enabled so that the contents of NOSCRIPT can be skipped. Otherwise, it would be required to parse the contents of that tag.
2e0264f
to
a6159d8
Compare
Committed to Core |
Backported to Core's |
Trac Ticket: #59292
When encountering elements that imply switching into the RAWTEXT parsing state, the Tag Processor should skip processing until existing the RAWTEXT state.
In this patch the Tag Processor does just that, except for the case of the deprecated XMP element which implies further and more complicated rules.
There's an implicit assumption that the SCRIPT ENABLED flag in HTML parsing is enabled so that the contents of NOSCRIPT can be skipped. Otherwise, it would be required to parse the contents of that tag.
This was not a reported bug; it was discovered through the Core unit test cases for
kses