From bee24dc17c28c48f8c5edc68e60eb64c96e5ab46 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 30 Jul 2020 12:26:45 +0000 Subject: [PATCH] I18N: Use a placeholder instead of the `\` character in a translatable string in `WP_REST_Users_Controller::check_user_password()`. Props ramiy. Fixes #50812. git-svn-id: https://develop.svn.wordpress.org/trunk@48692 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-users-controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index 2320668222..21a4b829a7 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -1291,7 +1291,11 @@ class WP_REST_Users_Controller extends WP_REST_Controller { if ( false !== strpos( $password, '\\' ) ) { return new WP_Error( 'rest_user_invalid_password', - __( 'Passwords cannot contain the "\\" character.' ), + sprintf( + /* translators: %s: The '\' character. */ + __( 'Passwords cannot contain the "%s" character.' ), + '\\' + ), array( 'status' => 400 ) ); }