Make WordPress Core

Ticket #16330: 16330.diff

File 16330.diff, 578 bytes (added by kawauso, 13 years ago)

urldecode() the end filename

  • wp-admin/includes/media.php

     
    565565                // Set variables for storage
    566566                // fix file filename for query strings
    567567                preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches);
    568                 $file_array['name'] = basename($matches[0]);
     568                $file_array['name'] = urldecode( basename( $matches[0] ) );
    569569                $file_array['tmp_name'] = $tmp;
    570570
    571571                // If error storing temporarily, unlink