[wp-trac] [WordPress Trac] #60406: HTML API: CDATA Lookalike comments match invalid CDATA

WordPress Trac noreply at wordpress.org
Thu Feb 1 00:10:34 UTC 2024


#60406: HTML API: CDATA Lookalike comments match invalid CDATA
--------------------------------------+------------------------------
 Reporter:  jonsurrell                |       Owner:  jonsurrell
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  HTML API                  |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by dmsnell):

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


Comment:

 In [changeset:"57506" 57506]:
 {{{
 #!CommitTicketReference repository="" revision="57506"
 HTML API: Fix CDATA lookalike matching invalid CDATA

 When `next_token()` was introduced to the HTML Tag Processor, it started
 classifying comments that look like they were intended to be CDATA
 sections.
 In one of the changes made during development, however, a typo slipped
 through code review that treated comments as CDATA even if they only
 ended in `]>` and not the required `]]>`.

 The consequences of this defect were minor because in all cases these are
 treated as HTML comments from invalid syntax, but this patch adds the
 missing check to ensure the proper reporting of CDATA-lookalikes.

 Follow-up to [57348]

 Props jonsurrell
 Fixes #60406
 }}}

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


More information about the wp-trac mailing list