- Timestamp:
- 11/08/2016 06:35:51 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r39126 r39157 521 521 $prepared_comment = apply_filters( 'rest_pre_insert_comment', $prepared_comment, $request ); 522 522 523 $comment_id = wp_insert_comment( $prepared_comment);523 $comment_id = wp_insert_comment( wp_filter_comment( wp_slash( (array) $prepared_comment ) ) ); 524 524 525 525 if ( ! $comment_id ) { … … 645 645 } 646 646 647 $updated = wp_update_comment( $prepared_args);647 $updated = wp_update_comment( wp_slash( (array) $prepared_args ) ); 648 648 649 649 if ( 0 === $updated ) { … … 996 996 */ 997 997 if ( isset( $request['content'] ) && is_string( $request['content'] ) ) { 998 $prepared_comment['comment_content'] = wp_filter_kses( $request['content'] );998 $prepared_comment['comment_content'] = $request['content']; 999 999 } elseif ( isset( $request['content']['raw'] ) && is_string( $request['content']['raw'] ) ) { 1000 $prepared_comment['comment_content'] = wp_filter_kses( $request['content']['raw'] );1000 $prepared_comment['comment_content'] = $request['content']['raw']; 1001 1001 } 1002 1002
Note: See TracChangeset
for help on using the changeset viewer.