Changes between Version 3 and Version 4 of Ticket #57642
- Timestamp:
- 02/06/2023 02:48:10 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57642
- Property Keywords has-unit-tests added
-
Property
Milestone
changed from
Awaiting Review
to6.2
-
Property
Summary
changed from
Backport updates to `wp_render_elements_support` to use html API
toUpdates `wp_render_elements_support()` to use the HTML API
-
Ticket #57642 – Description
v3 v4 1 We need to update `wp_render_elements_support` to use the new htmlAPI (`WP_HTML_Tag_Processor`).1 Replaces the RegEx and PHP string functionality in `wp_render_elements_support()` to use the new HTML API (`WP_HTML_Tag_Processor`). 2 2 3 Related GB PR: https://github.com/WordPress/gutenberg/pull/46625 3 Why? 4 5 >This class was built to quickly and reliably modify HTML tag attributes. It circumvents specific problems, such as matching on the wrong attributes (such as data-custom-class="some value"), overlooking matches (such as class=blue or class='wp-block-group'), writing updates in a way that get overlooked by the browser (by writing to the end of the tag instead of before any potential duplicate attributes), and by writing invalid content to the HTML (such as through a bug in a PCRE pattern greedily matching more than it should). 6 7 Reference: 8 * [https://github.com/WordPress/gutenberg/pull/46625 Gutenberg PR 46625]