[wp-trac] [WordPress Trac] #59607: HTML API: Fix - avoid calling subclass method while internally scanning in Tag Processor

WordPress Trac noreply at wordpress.org
Fri Oct 13 19:18:53 UTC 2023


#59607: HTML API: Fix - avoid calling subclass method while internally scanning in
Tag Processor
-------------------------------------------------+-------------------------
 Reporter:  dmsnell                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.4
Component:  HTML API                             |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing-info                                   |
-------------------------------------------------+-------------------------

Comment (by dmsnell):

 to make the unit test clearer, without this patch the breadcrumbs
 misreport after updating the tag's attribute. after calling
 `get_updated_html()` the method `get_breadcrumbs()` incorrectly reports
 `array( 'HTML', 'BODY', 'DIV', 'BUTTON', 'B', 'B' )`, because when
 `next_tag()` was called the HTML Processor thought it was entering the `B`
 element for the first time and appended it to the stack of open elements.

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


More information about the wp-trac mailing list