From 38430b05334c2ea37f62c4d65932e45209fd8553 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Sat, 17 Sep 2016 06:27:31 +0000 Subject: [PATCH] Media: Improved media titles when created from filename. Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media. Merge of [38614] to the 4.6 branch. Props joemcgill. Fixes #37989. Built from https://develop.svn.wordpress.org/branches/4.6@38615 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38558 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index c6b2dcd1ba..7ff6e4a652 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -290,7 +290,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override $url = $file['url']; $type = $file['type']; $file = $file['file']; - $title = sanitize_title( $name ); + $title = sanitize_text_field( $name ); $content = ''; $excerpt = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 1f3b7782a8..5c99377ed8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6.2-alpha-38581'; +$wp_version = '4.6.2-alpha-38615'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.