[wp-trac] [WordPress Trac] #60392: HTML API: Tag processor no longer visits all closing tags

WordPress Trac noreply at wordpress.org
Wed Jan 31 01:35:21 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:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by 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>`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60392#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list