[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 17:20:30 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):

 What potential problems do you see with foreign characters?  Another thing
 that I have been asked to do by a user was keep foreign characters in the
 filename.  I could of course run remove_accents on it to take care of the
 accents.  I seem to have no problem with foreign characters in filenames
 on my system.

 My only thought about replacing punctuation with dashes is that I would
 like to keep the number of dashes limited.  My personal opinion is that it
 makes for better readability if punctuation is removed as opposed to being
 replaced with dashes.

 And yes I do see the error in the regex there.  I'll fix that soon.

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


More information about the wp-trac mailing list