diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ac5882a1de..a0c35b325b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2336,8 +2336,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'] ); + } /** * Filter list of allowed mime types and file extensions.