Comments: Improve comment content filtering.
Merges [44842] to the 3.7 branch. Built from https://develop.svn.wordpress.org/branches/3.7@44857 git-svn-id: http://core.svn.wordpress.org/branches/3.7@44689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
093a17d3c8
commit
d2398ee562
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue