[wp-trac] [WordPress Trac] #30495: Unicode character U+000B is not removed by sanitize_file_name

WordPress Trac noreply at wordpress.org
Tue Nov 25 11:37:09 UTC 2014


#30495: Unicode character U+000B is not removed by sanitize_file_name
----------------------------+-----------------------------
 Reporter:  Craxic          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Filesystem API  |    Version:  4.0.1
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 It seems that the following expression is true:

 {{{
 json_encode(sanitize_file_name(json_decode('"\u000B"'))) == "\u000b"
 }}}

 On Google App Engine, for example, a file name with a U+000B character
 cannot be saved.

 Since the description of the function states:

   Removes special characters that are illegal in filenames on certain
   operating systems and special characters requiring special escaping
   to manipulate at the command line.

 ... then I think this is a bug.

 Thanks!

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


More information about the wp-trac mailing list