[wp-trac] [WordPress Trac] #22363: Accents in attachment filenames should be sanitized

WordPress Trac noreply at wordpress.org
Mon Nov 18 20:21:49 UTC 2013


#22363: Accents in attachment filenames should be sanitized
----------------------------------------+------------------
 Reporter:  tar.gz                      |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  3.8
Component:  Upload                      |     Version:  3.4
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+------------------

Comment (by p_enrique):

 I have two more comments on this matter:

 1. I think there are plugins like cyr2lat, arabic-to-lat etc. that convert
 characters in Non-Latin scripts to ASCII. These will work if they hook to
 `sanitize_file_name`.

 2. There should be an extra filter for Windows-based servers that tries to
 convert everything possible to ASCII and strips out the rest. Otherwise,
 the attachments and images ''will'' break under Windows. But such a filter
 would need a fallback filename for a case where converting/stripping
 leaves no ASCII at all. What would that be?

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


More information about the wp-trac mailing list