diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index cb18e0580b..660eb5bc42 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -794,6 +794,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 859ccb4644..01b9b29de4 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -102,6 +102,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 {