diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index a3e813dd61..df5d209e48 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -2552,8 +2552,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.