Comments: Improve comment content filtering.

git-svn-id: https://develop.svn.wordpress.org/trunk@44842 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-03-12 22:29:46 +00:00
parent 4a0e3f009d
commit bb281f9bd3
2 changed files with 4 additions and 0 deletions

View File

@@ -3243,6 +3243,8 @@ function wp_handle_comment_submission( $comment_data ) {
) {
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 {