Make WordPress Core


Ignore:
Timestamp:
03/19/2014 07:15:23 AM (12 years ago)
Author:
wonderboymusic
Message:

In sanitize_file_name(), replace a UTF-8-encoded Unicode representation of a non-breaking space (\u00a0 / \xc2\xa) with an old-fashioned space: .

Fixes #27281.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r27527 r27617  
    889889     */
    890890    $special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );
     891    $filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
    891892    $filename = str_replace($special_chars, '', $filename);
    892893    $filename = preg_replace('/[\s-]+/', '-', $filename);
Note: See TracChangeset for help on using the changeset viewer.