Make WordPress Core

Ticket #22363: 22363.3.diff

File 22363.3.diff, 650 bytes (added by audrasjb, 5 years ago)

Media: Remove accent from media file names (patch refreshed against trunk)

  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index 45fb3c35b6..43eaa5adaa 100644
    a b function sanitize_file_name( $filename ) { 
    20332033         */
    20342034        $special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );
    20352035        $filename      = str_replace( $special_chars, '', $filename );
     2036        $filename      = remove_accents( $filename );
    20362037        $filename      = str_replace( array( '%20', '+' ), '-', $filename );
    20372038        $filename      = preg_replace( '/[\r\n\t -]+/', '-', $filename );
    20382039        $filename      = trim( $filename, '.-_' );