From ee60e36a2c4a208de52af562abc3e23144541010 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 15 Jan 2016 07:28:48 +0000 Subject: [PATCH] Users: Decode special characters in password and email change notification emails. Fixes #35283. git-svn-id: https://develop.svn.wordpress.org/trunk@36306 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 195f72cc8d..3cf37bdf05 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -1689,7 +1689,7 @@ function wp_update_user($userdata) { if ( ! is_wp_error( $user_id ) ) { - $blog_name = wp_specialchars_decode( get_option( 'blogname' ) ); + $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); if ( ! empty( $send_password_change_email ) ) { @@ -1741,7 +1741,7 @@ All at ###SITENAME### $pass_change_email['message'] = str_replace( '###USERNAME###', $user['user_login'], $pass_change_email['message'] ); $pass_change_email['message'] = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $pass_change_email['message'] ); $pass_change_email['message'] = str_replace( '###EMAIL###', $user['user_email'], $pass_change_email['message'] ); - $pass_change_email['message'] = str_replace( '###SITENAME###', get_option( 'blogname' ), $pass_change_email['message'] ); + $pass_change_email['message'] = str_replace( '###SITENAME###', $blog_name, $pass_change_email['message'] ); $pass_change_email['message'] = str_replace( '###SITEURL###', home_url(), $pass_change_email['message'] ); wp_mail( $pass_change_email['to'], sprintf( $pass_change_email['subject'], $blog_name ), $pass_change_email['message'], $pass_change_email['headers'] ); @@ -1795,7 +1795,7 @@ All at ###SITENAME### $email_change_email['message'] = str_replace( '###USERNAME###', $user['user_login'], $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###EMAIL###', $user['user_email'], $email_change_email['message'] ); - $email_change_email['message'] = str_replace( '###SITENAME###', get_option( 'blogname' ), $email_change_email['message'] ); + $email_change_email['message'] = str_replace( '###SITENAME###', $blog_name, $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###SITEURL###', home_url(), $email_change_email['message'] ); wp_mail( $email_change_email['to'], sprintf( $email_change_email['subject'], $blog_name ), $email_change_email['message'], $email_change_email['headers'] );