Ticket #16191: handle urlencoded characters.diff
File handle urlencoded characters.diff, 960 bytes (added by , 14 years ago) |
---|
-
wp-admin/includes/file.php
271 271 } 272 272 } 273 273 274 // Ensure the filename on the filesystem matches the filename we record in WP 275 $file[ 'name' ] = urldecode( $file[ 'name' ] ); 276 274 277 $file = apply_filters( 'wp_handle_upload_prefilter', $file ); 275 278 276 279 // You may define your own function and pass the name in $overrides['upload_error_handler'] -
wp-admin/includes/media.php
196 196 $time = $post->post_date; 197 197 } 198 198 199 $name = $_FILES[$file_id]['name'];199 $name = urldecode( $_FILES[$file_id]['name'] ); 200 200 $file = wp_handle_upload($_FILES[$file_id], $overrides, $time); 201 201 202 202 if ( isset($file['error']) )