REST API: Use wp_slash rather than addslashes.

See #38726.
Props dd32.

Built from https://develop.svn.wordpress.org/trunk@39192


git-svn-id: http://core.svn.wordpress.org/trunk@39132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe Hoyle 2016-11-10 02:39:30 +00:00
parent 67da42825e
commit 3138878aa5
2 changed files with 2 additions and 2 deletions

View File

@ -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( addslashes( $prepared_term->name ), $this->taxonomy, wp_slash( (array) $prepared_term ) );
$term = wp_insert_term( wp_slash( $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,

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-beta2-39191';
$wp_version = '4.7-beta2-39192';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.