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

WordPress Trac noreply at wordpress.org
Sat Jun 29 06:58:40 UTC 2013


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

Comment (by NumidWasNotAvailable):

 === About sanitizing filenames ===

 Modern browsers handle Unicode characters in URLs. Actually they perform
 an automatic translation using percent encoding. In some configurations it
 is quite transparent for the users.

 [http://tools.ietf.org/html/rfc3986 RFC 3986] says  that non ASCII
 charcaters are not allowed in URIs.

 By allowing accented characters in URLs, Wordpress relies on the fact that
 nowadays everyone is using a modern browser. This is understandable, just
 have a look at the statistics at [http://gs.statcounter.com/ StatCounter].

 However, some users may encounter an issue since URLs are not RFC 3986
 compliant. **Furthermore, I would be interested to know what
 configurations are concerned by this issue so far.**

 I am coming up with the following patch: filenames are sanitized using
 `sanitize_title` as suggested by tar.gz.

 === About `remove_accents` ===

 In this ticket we have discovered that `remove_accents` was not handling
 Unicode combining characters at all.

 I think we can create a new ticket for this issue.

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


More information about the wp-trac mailing list