From 29bc3920bebdada1e98d901a5ab9fa0ffb697061 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Thu, 18 Jan 2018 14:42:34 +0000 Subject: [PATCH] Editor: change the test in `user_can_richedit()` to also detect when IE11 is in compatibility mode. Props ndavison, azaozz. Fixes #42503 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42529 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index ca2dbc02ec..4fda9c725b 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -3081,7 +3081,7 @@ function user_can_richedit() { if ( $is_safari ) { $wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 ); } elseif ( $is_IE ) { - $wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE ' ) === false ); + $wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0;' ) !== false ); } elseif ( $is_gecko || $is_chrome || $is_edge || ( $is_opera && ! wp_is_mobile() ) ) { $wp_rich_edit = true; }