[wp-trac] [WordPress Trac] #60170: HTML API: Scan every token in an HTML document.

WordPress Trac noreply at wordpress.org
Wed Apr 24 07:43:18 UTC 2024


#60170: HTML API: Scan every token in an HTML document.
---------------------------------------------------+----------------------
 Reporter:  dmsnell                                |       Owner:  dmsnell
     Type:  enhancement                            |      Status:  closed
 Priority:  normal                                 |   Milestone:  6.5
Component:  HTML API                               |     Version:  6.5
 Severity:  normal                                 |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests has-dev-note  |     Focuses:
---------------------------------------------------+----------------------
Changes (by dmsnell):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58040" 58040]:
 {{{
 #!CommitTicketReference repository="" revision="58040"
 HTML API: Fix detection of single-length funky comments.

 Since [60428] the Tag Processor has been misidentifying single-character
 funky comments. It has been asserting that the full token-length for a
 funky comment must be at least three characters after the opening (e.g.
 `</1>`), but it has been starting to look for the closing `>` after
 those same three characters. This means that it has been skipping the
 actual close of these funky comments and swallowing up the next syntax
 until it finds a `>`, often consuming the next tag in the process.

 This patch fixes the detector and restores finding the following token.

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

 Follow-up to [60428].
 Fixes #60170.
 Props dmsnell, gziolo, jonsurrell.
 }}}

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


More information about the wp-trac mailing list