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

WordPress Trac noreply at wordpress.org
Thu Feb 23 22:46:53 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 2nd-opinion  |     Focuses:  docs
--------------------------------------------------+-----------------------
Changes (by azaozz):

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests 2nd-
               opinion


Comment:

 Replying to [comment:16 SergeyBiryukov]:

 > The new `$allowed_comments` parameter seems a bit confusing to me.

 Same here.

 > Should the documentation perhaps be adjusted instead to note that
 comments are preserved and this is an explicit choice? I believe that can
 still be done for 6.2.

 +1. Also perhaps mention that there is a `wp_strip_all_tags()` that is
 (most likely) quite faster, see:
 https://developer.wordpress.org/reference/functions/wp_strip_all_tags/.

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


More information about the wp-trac mailing list