From cc80d2c1317fdf2b72922c5b496014129734afda Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 7 Sep 2016 14:00:34 +0000 Subject: [PATCH] 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 --- wp-admin/includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 06cd1c1283..65477e5949 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -262,7 +262,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 ) ) {