diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 5a2d3c5d4e..c5f6feb2f0 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -2565,8 +2565,9 @@ function get_allowed_mime_types( $user = null ) { if ( function_exists( 'current_user_can' ) ) $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' ); - if ( empty( $unfiltered ) ) - unset( $t['htm|html'] ); + if ( empty( $unfiltered ) ) { + unset( $t['htm|html'], $t['js'] ); + } /** * Filters list of allowed mime types and file extensions.