mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Media: Improved media titles when created from filename.
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media. Merge of [38615] to the 4.1 branch. Fixes #37989. Built from https://develop.svn.wordpress.org/branches/4.1@39715 git-svn-id: http://core.svn.wordpress.org/branches/4.1@39655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dc2355312d
commit
9ee6a9ad66
@ -279,7 +279,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 = '';
|
||||
|
||||
if ( preg_match( '#^audio#', $type ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user