WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/27/2017 02:58:06 PM (10 months ago)
Author:
johnbillion
Message:

Users: Further fixes to entitiy decoding in the user email address change confirmation email, and the corresponding tests.

See #16470, #40015

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r41166 r41171  
    26402640        update_user_meta( $current_user->ID, '_new_email', $new_user_email );
    26412641
     2642        if ( is_multisite() ) {
     2643            $sitename = get_site_option( 'site_name' );
     2644        } else {
     2645            $sitename = get_option( 'blogname' );
     2646        }
     2647
    26422648        /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    26432649        $email_text = __( 'Howdy ###USERNAME###,
     
    26782684        $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
    26792685        $content = str_replace( '###EMAIL###', $_POST['email'], $content );
    2680         $content = str_replace( '###SITENAME###', wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ), $content );
     2686        $content = str_replace( '###SITENAME###', wp_specialchars_decode( $sitename, ENT_QUOTES ), $content );
    26812687        $content = str_replace( '###SITEURL###', network_home_url(), $content );
    26822688
    2683         wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
     2689        wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content );
    26842690
    26852691        $_POST['email'] = $current_user->user_email;
Note: See TracChangeset for help on using the changeset viewer.