[wp-trac] [WordPress Trac] #61009: HTML API: Fix some existing bugs in `kses` comment detection, enable Bits storage.

WordPress Trac noreply at wordpress.org
Mon Jun 17 12:03:06 UTC 2024


#61009: HTML API: Fix some existing bugs in `kses` comment detection, enable Bits
storage.
--------------------------------------------------+---------------------
 Reporter:  dmsnell                               |       Owner:  (none)
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  6.6
Component:  HTML API                              |     Version:  trunk
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch 2nd-opinion has-unit-tests  |     Focuses:
--------------------------------------------------+---------------------

Comment (by dmsnell):

 In [changeset:"58424" 58424]:
 {{{
 #!CommitTicketReference repository="" revision="58424"
 KSES: Fix tests and detection of HTML Bogus Comment spans.

 In [58418] a test was added without the `test_` prefix in its function
 name, and because of that, it wasn't run in the test suite.
 The prefix has been added to ensure that it runs.

 In the original patch, due to a logical bug, a recursive loop to
 transform the inside contents of the bogus comments was never run
 more than once. This has been fixed.

 This patch also includes one more case where `kses` wasn't
 properly detecting the bogus comment state, and adds a test case
 to cover this. It limits itself to some but not all constructions
 of invalid markup declaration so that it doesn't conflict with
 existing behaviors around those and other kinds of invalid comments.

 Props ellatrix, dmsnell.
 See #61009.
 Follow-up to [58418].
 }}}

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


More information about the wp-trac mailing list