WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/24/2014 10:08:09 PM (7 years ago)
Author:
wonderboymusic
Message:

In sanitize_file_name(), replace %20 and + with dashes. Remove unnecessary code from _wp_handle_upload().

Adds unit tests.

Props ericmann.
Fixes #16330.

File:
1 edited

Legend:

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

    r29209 r29290  
    328328
    329329    $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
    330     // Strip the query strings.
    331     $filename = str_replace( '?', '-', $filename );
    332     $filename = str_replace( '&', '-', $filename );
    333330
    334331    // Move the file to the uploads dir.
Note: See TracChangeset for help on using the changeset viewer.