mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 21:00:59 +01:00
Media: Sanitize upload filename.
Merge of [38538] to the 3.9 branch. Built from https://develop.svn.wordpress.org/branches/3.9@38546 git-svn-id: http://core.svn.wordpress.org/branches/3.9@38489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
391fa0940c
commit
cc80d2c131
@ -262,7 +262,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
|
|||||||
$url = $file['url'];
|
$url = $file['url'];
|
||||||
$type = $file['type'];
|
$type = $file['type'];
|
||||||
$file = $file['file'];
|
$file = $file['file'];
|
||||||
$title = $name;
|
$title = sanitize_title( $name );
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
||||||
if ( preg_match( '#^audio#', $type ) ) {
|
if ( preg_match( '#^audio#', $type ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user