diff --git src/wp-admin/includes/media.php src/wp-admin/includes/media.php
index 35aa791..3d89758 100644
|
|
|
function media_handle_upload($file_id, $post_id, $post_data = array(), $override |
| 284 | 284 | if ( isset($file['error']) ) |
| 285 | 285 | return new WP_Error( 'upload_error', $file['error'] ); |
| 286 | 286 | |
| 287 | | $basename = pathinfo( $name, PATHINFO_BASENAME ); |
| | 287 | $name = pathinfo( $name, PATHINFO_FILENAME ); |
| 288 | 288 | |
| 289 | 289 | $url = $file['url']; |
| 290 | 290 | $type = $file['type']; |
| 291 | 291 | $file = $file['file']; |
| 292 | | $title = sanitize_title( $basename ); |
| | 292 | $title = sanitize_text_field( $name ); |
| 293 | 293 | $content = ''; |
| 294 | 294 | $excerpt = ''; |
| 295 | 295 | |