diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0b52f8f7bd..c58e8ed9fa 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2344,8 +2344,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.