diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 966dcd8265..efb310c1c1 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2553,8 +2553,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.