[wp-trac] [WordPress Trac] #54488: wp_filter_nohtml_kses does not remove HTML comments

WordPress Trac noreply at wordpress.org
Thu Feb 9 20:41:02 UTC 2023


#54488: wp_filter_nohtml_kses does not remove HTML comments
-------------------------------------------------+-------------------------
 Reporter:  leewillis77                          |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.2
Component:  Formatting                           |     Version:  2.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:  docs
  testing                                        |
-------------------------------------------------+-------------------------
Changes (by audrasjb):

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests needs-
     testing


Comment:

 Testing instructions:

 {{{#!php
 <?php
 echo wp_filter_nohtml_kses('<!-- This is a comment -->This is not a
 comment');
 }}}

 Expected result: `This is not a comment`
 Actual behaviour: `<!-- comment -->This is not a comment`

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


More information about the wp-trac mailing list