REST API: Use wp_slash rather than addslashes.
See #38726. Props dd32. git-svn-id: https://develop.svn.wordpress.org/trunk@39192 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c67401baf1
commit
660333387e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user