[wp-trac] [WordPress Trac] #40606: wp_filter_nohtml_kses escaping single quotes even when no HTML tags are being used in the string

WordPress Trac noreply at wordpress.org
Sat Apr 29 11:29:09 UTC 2017


#40606: wp_filter_nohtml_kses escaping single quotes even when no HTML tags are
being used in the string
----------------------------+-----------------------------
 Reporter:  samuelaguilera  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  4.7.4
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 According to Codex wp_filter_nohtml_kses( $data ) should only '''strip all
 of the HTML in the content'''. But it also escapes single quotes in plain
 text.

 Example:

 {{{#!php
 <?php
         $filtered_string = wp_filter_nohtml_kses(  "You're not allowed to
 do this!" );
         echo $filtered_string;
 }}}

 The above will output:


 {{{
 You\'re not allowed to do this!
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40606>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list