[wp-trac] Re: [WordPress Trac] #9416: Better file name sanitization for wp_unique_filename

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 21 15:01:39 GMT 2009


#9416: Better file name sanitization for wp_unique_filename
-------------------------+--------------------------------------------------
 Reporter:  sivel        |       Owner:  sivel      
     Type:  enhancement  |      Status:  assigned   
 Priority:  normal       |   Milestone:  2.8        
Component:  Upload       |     Version:  2.7.1      
 Severity:  normal       |    Keywords:  needs-patch
-------------------------+--------------------------------------------------

Comment(by sivel):

 Here is my first go.  I've updated the phpdoc comments for the
 sanitize_file_name function so read the comments for what we are doing.
 wp_unique_filename no longer converts filenames to all lowercase.

 sanitize_file_name was previously only used by xmlrpc and APP.  I don't
 use those functionalities so it would be appreciated if someone could test
 and make sure the changes to sanitize_file_name don't break anything.

 2 filters have been added, 1 for filtering the sanitization characters and
 one for the returned file name.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9416#comment:26>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list