[wp-trac] [WordPress Trac] #56430: sanitize_text_field strips out valid characters

WordPress Trac noreply at wordpress.org
Wed Aug 24 14:52:07 UTC 2022


#56430: sanitize_text_field strips out valid characters
--------------------------+-----------------------------
 Reporter:  vaakash       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.0.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 `sanitize_text_field` function strips out valid characters like for
 example `%de` from `%description%`

 I cannot find other combinations of such but noticed this issue when a
 user reported for my plugin. Not sure if there are more.

 Example:

 {{{#!php
 <?php
 echo sanitize_text_field( 'Hello %description% world' );
 ?>
 }}}

 Outputs

 {{{
 Hello scription% world
 }}}

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


More information about the wp-trac mailing list