Media: Sanitize upload filename.
Merge of [38538] to the 4.1 branch. Built from https://develop.svn.wordpress.org/branches/4.1@38544 git-svn-id: http://core.svn.wordpress.org/branches/4.1@38487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0be5d63999
commit
98ead2d8bb
|
@ -279,7 +279,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
|
|||
$url = $file['url'];
|
||||
$type = $file['type'];
|
||||
$file = $file['file'];
|
||||
$title = $name;
|
||||
$title = sanitize_title( $name );
|
||||
$content = '';
|
||||
|
||||
if ( preg_match( '#^audio#', $type ) ) {
|
||||
|
|
Loading…
Reference in New Issue