From 5c4b8e4eae84072c1a02c7ac8d8ecd98ea071e10 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 7 Sep 2016 13:58:51 +0000 Subject: [PATCH] Media: Sanitize upload filename. Merge of [38538] to the 4.3 branch. Built from https://develop.svn.wordpress.org/branches/4.3@38542 git-svn-id: http://core.svn.wordpress.org/branches/4.3@38485 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 fc8ce0fe97..40e394a32b 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -280,7 +280,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 = ''; $excerpt = '';