mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 05:55:18 +00:00
Comments: Improve comment content filtering.
Merges [44842] to the 5.1 branch. Built from https://develop.svn.wordpress.org/branches/5.1@44843 git-svn-id: http://core.svn.wordpress.org/branches/5.1@44675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b9e24e33a8
commit
630bd65305
@ -1214,6 +1214,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 {
|
||||
|
@ -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 {
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.1.1-RC1-44834';
|
||||
$wp_version = '5.1.1-RC1-44843';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user