- Timestamp:
- 11/10/2016 02:09:40 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
r39126 r39190 381 381 $prepared_term = $this->prepare_item_for_database( $request ); 382 382 383 $term = wp_insert_term( $prepared_term->name, $this->taxonomy, $prepared_term);383 $term = wp_insert_term( addslashes( $prepared_term->name ), $this->taxonomy, wp_slash( (array) $prepared_term ) ); 384 384 if ( is_wp_error( $term ) ) { 385 385 /* … … 492 492 // Only update the term if we haz something to update. 493 493 if ( ! empty( $prepared_term ) ) { 494 $update = wp_update_term( $term->term_id, $term->taxonomy, (array) $prepared_term);494 $update = wp_update_term( $term->term_id, $term->taxonomy, wp_slash( (array) $prepared_term ) ); 495 495 496 496 if ( is_wp_error( $update ) ) { … … 822 822 'type' => 'string', 823 823 'context' => array( 'view', 'edit' ), 824 'arg_options' => array(825 'sanitize_callback' => 'wp_filter_post_kses',826 ),827 824 ), 828 825 'link' => array(
Note: See TracChangeset
for help on using the changeset viewer.