8000 Switch to `wp_filter_kses()` in an attempt to avoid having to pass gl… · WP-API/WP-API@d474fe0 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Commit d474fe0

Browse files
committed
Switch to wp_filter_kses() in an attempt to avoid having to pass global allowed tags
1 parent 8473bed commit d474fe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/endpoints/class-wp-rest-comments-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ protected function prepare_item_for_database( $request ) {
755755
if ( current_user_can( 'unfiltered_html' ) && isset( $prepared_comment['comment_content'] ) ) {
756756
$prepared_comment['comment_content'] = wp_kses_post( $prepared_comment['comment_content'] );
757757
} elseif ( isset( $prepared_comment['comment_content'] ) ) {
758-
$prepared_comment['comment_content'] = wp_kses( $prepared_comment['comment_content'] );
758+
$prepared_comment['comment_content'] = wp_filter_kses( $prepared_comment['comment_content'] );
759759
}
760760

761761
if ( isset( $request['post'] ) ) {

0 commit comments

Comments
 (0)
0