[wp-trac] [WordPress Trac] #22363: Accents in attachment filenames should be sanitized
WordPress Trac
noreply at wordpress.org
Sun Nov 17 06:09:48 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'm not sure if I should open a new ticket for this, maybe someone will
advise me. Anyway, I've been testing `sanitize_file_name( 'X.jpg' )` where
X is an Unicode character that is a number or a letter (matching regex
`/[\p{L}\p{N}]/u`). Alarmingly, there are many rather common characters
that will result in a malformed, broken string being returned:
{{{
(U+00E0) : à Latin small letter a with grave
(U+0160) : Š Latin capital letter s with caron
(U+03A0) : Π Greek capital letter pi
(U+0420) : Р Cyrillic capital letter er
}}}
A complete list is attached.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22363#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list