[wp-trac] [WordPress Trac] #22363: Accents in attachment filenames should be sanitized
WordPress Trac
noreply at wordpress.org
Thu Feb 27 19:23:52 UTC 2020
#22363: Accents in attachment filenames should be sanitized
-------------------------------------+-----------------------------
Reporter: tar.gz | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Media | Version: 3.4
Severity: critical | Resolution:
Keywords: needs-testing has-patch | Focuses:
-------------------------------------+-----------------------------
Comment (by nilovelez):
I have just updating a working patch.
I have applied the `remove_accents()` function to the
`sanitize_file_name()` in `/wp-includes/formatting.php` just after
`$special_chars` are removed.
**Test filename:** Bolígrafo Ecológico 2€.jpg
**Before patch:** Bolígrafo Ecológico 2€.jpg
(Bol%C3%ADgrafo%20Ecol%C3%B3gico%202%E2%82%AC.jpg)
**After patch:** Boligrafo-Ecologico-2E.jpg
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22363#comment:112>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list