[wp-trac] [WordPress Trac] #61576: HTML API: Improved spec support in 6.7

WordPress Trac noreply at wordpress.org
Wed Sep 4 19:24:04 UTC 2024


#61576: HTML API: Improved spec support in 6.7
--------------------------------------+---------------------
 Reporter:  dmsnell                   |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  6.7
Component:  HTML API                  |     Version:  6.6
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by dmsnell):

 In [changeset:"58992" 58992]:
 {{{
 #!CommitTicketReference repository="" revision="58992"
 HTML API: Only examine HTML nodes in `pop_until()` instack of open
 elements.

 The `pop_until( $tag_name )` method in the stack of open elements should
 only be examining HTML elements, but it has only been checking the tag
 name. This has led to closing the wrong tags when run from inside foreign
 content. A very specific situation where this may arise is when a
 `TEMPLATE` closer is found inside foreign content, inside another
 template.

 {{{
 HTML:template   SVG:template                 HTML:/template
 <template><svg><template><foreignObject><div></template><div>
 ╰──< this outer TEMPLATE is closed by this one >───╯
 }}}

 This patch constains the method to checking for elements matching the tag
 name which are in the HTML namespace so that the proper detection occurs.

 Developed in https://github.com/WordPress/wordpress-develop/pull/7286
 Discussed in https://core.trac.wordpress.org/ticket/61576

 Follow-up to [58867].

 Props dmsnell, jonsurrell.
 See #61576.
 }}}

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


More information about the wp-trac mailing list