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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user