diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index cfe3f6dbc8..2d6c47a125 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -380,7 +380,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller { $prepared_term = $this->prepare_item_for_database( $request ); - $term = wp_insert_term( $prepared_term->name, $this->taxonomy, $prepared_term ); + $term = wp_insert_term( addslashes( $prepared_term->name ), $this->taxonomy, wp_slash( (array) $prepared_term ) ); if ( is_wp_error( $term ) ) { /* * If we're going to inform the client that the term already exists, @@ -491,7 +491,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller { // Only update the term if we haz something to update. if ( ! empty( $prepared_term ) ) { - $update = wp_update_term( $term->term_id, $term->taxonomy, (array) $prepared_term ); + $update = wp_update_term( $term->term_id, $term->taxonomy, wp_slash( (array) $prepared_term ) ); if ( is_wp_error( $update ) ) { return $update; @@ -821,9 +821,6 @@ class WP_REST_Terms_Controller extends WP_REST_Controller { 'description' => __( 'HTML description of the resource.' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), - 'arg_options' => array( - 'sanitize_callback' => 'wp_filter_post_kses', - ), ), 'link' => array( 'description' => __( 'URL to the resource.' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 503e5d8156..dceb84a7ec 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta2-39189'; +$wp_version = '4.7-beta2-39190'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.