[wp-trac] [WordPress Trac] #60392: HTML API: Tag processor no longer visits all closing tags
WordPress Trac
noreply at wordpress.org
Wed Jan 31 18:26:16 UTC 2024
#60392: HTML API: Tag processor no longer visits all closing tags
--------------------------+---------------------
Reporter: westonruter | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: HTML API | Version: trunk
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+---------------------
Changes (by westonruter):
* keywords: needs-patch => close
Comment:
Replying to [comment:2 dmsnell]:
> @westonruter we made a breaking change in this behavior in order to
avoid mistakes dealing with the fact that no HTML exists inside the
`TITLE`.
>
> you can now treat `TITLE` and the other special tags as if they were
void or self-closing. to get the contents, call
`$processor->get_modifiable_text()` while matched on a `TITLE` tag.
>
> you will also still visit closing `TITLE` tags if they appear
unexpectedly, as in `<div>This is not a div closer</title>`
OK, thanks. Please let me know if this change aligns with the changes in
WP 5.6: https://github.com/WordPress/performance/pull/963
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60392#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list