[wp-trac] [WordPress Trac] #54818: JPEG file names are no longer sanitized
WordPress Trac
noreply at wordpress.org
Fri Jan 14 11:52:16 UTC 2022
#54818: JPEG file names are no longer sanitized
--------------------------+-----------------------------
Reporter: Chaton666 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.9
Component: Media | Version: 5.8.3
Severity: major | Resolution:
Keywords: | Focuses: administration
--------------------------+-----------------------------
Comment (by Chaton666):
It's look like the problem is in the sanitize_file_name function (wp-
includes/formatting.php).
With a file named "Exemple-1-activités-de-construction.jpg", I don't pass
this check and accent is not removed :
{{{
// Return if only one extension.
if ( count( $parts ) <= 2 ) {
/** This filter is documented in wp-includes/formatting.php */
return apply_filters( 'sanitize_file_name', $filename,
$filename_raw );
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54818#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list