From 660333387e874cb4802d7becec1764dad7362b06 Mon Sep 17 00:00:00 2001 From: joehoyle Date: Thu, 10 Nov 2016 02:38:02 +0000 Subject: [PATCH] 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 --- .../rest-api/endpoints/class-wp-rest-terms-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index 2d6c47a125..043966658d 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/src/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( 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,