Permalink
Browse files

Media: Sanitize upload filename.

Built from https://develop.svn.wordpress.org/trunk@38538


git-svn-id: http://core.svn.wordpress.org/trunk@38481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 4a06a09 commit c9e60dab176635d4bfaaf431c0ea891e4726d6e0 @jeremyfelt jeremyfelt committed Sep 7, 2016
Showing with 2 additions and 2 deletions.
  1. +1 −1 wp-admin/includes/media.php
  2. +1 −1 wp-includes/version.php
@@ -289,7 +289,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
- $title = $basename;
+ $title = sanitize_title( $basename );
$content = '';
$excerpt = '';
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
-$wp_version = '4.7-alpha-38536';
+$wp_version = '4.7-alpha-38538';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 comments on commit c9e60da

Please sign in to comment.