KSES: Reimplement with Tag Processor - #13271
Conversation
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. |
c784058 to
fdc5e96
Compare
bd15b3e to
38470b2
Compare
43c8868 to
54ea7dd
Compare
|
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. |
37425f9 to
59b9aa1
Compare
Todo - [ ] Remove opening and closing tags when missing attributes. - [ ] Handle parsing when it bails for unsupported content.
f4a9c35 to
3ea625d
Compare
Notably, contents of SCRIPT elements _should not_ be extracted and rendered as HTML text nodes. These are SCRIPT contents, and should be hidden from the page.
…ng the original content.
3ea625d to
bdbae3a
Compare
Trac ticket: Core-65984
Merge after #13273, which accounts for three of the failing tests.wp_kses(), it’s possible to simply wait until an opened element is closed based on depth, and skip that closing element if it exists.wp_kses()with intentionally-incomplete input, for example, a wrapper opening tag with part of the content, separately from the closer. closing open elements does a good job of isolating content, but legacy behaviors depend too much on the more procedural use ofwp_kses()so isolation cannot be reasonably added without mangling websites.