diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0adf06d50d..e58725d585 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1072,7 +1072,7 @@ function get_media_item( $attachment_id, $args = null ) { $toggle_on = __( 'Show' ); $toggle_off = __( 'Hide' ); - $filename = esc_html( basename( $post->guid ) ); + $filename = esc_html( wp_basename( $post->guid ) ); $title = esc_attr( $post->post_title ); if ( $_tags = get_the_tags( $attachment_id ) ) {