diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 96c9c22d19..48bad968dc 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -974,6 +974,8 @@ function wp_ajax_replyto_comment( $action ) { if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) { kses_remove_filters(); // start with a clean slate kses_init_filters(); // set up the filters + remove_filter( 'pre_comment_content', 'wp_filter_post_kses' ); + add_filter( 'pre_comment_content', 'wp_filter_kses' ); } } } else { diff --git a/wp-comments-post.php b/wp-comments-post.php index e1e41720a4..75a1c43b1c 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -108,6 +108,8 @@ if ( $user->exists() ) { ) { kses_remove_filters(); // start with a clean slate kses_init_filters(); // set up the filters + remove_filter( 'pre_comment_content', 'wp_filter_post_kses' ); + add_filter( 'pre_comment_content', 'wp_filter_kses' ); } } } else {