WordPress.org

Make WordPress Core

Ticket #25346: 25346.diff

File 25346.diff, 6.7 KB (added by jeremyfelt, 7 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    23122312                 */
    23132313                $email = apply_filters( 'auto_core_update_email', $email, $type, $core_update, $result );
    23142314
    2315                 wp_mail( $email['to'], $email['subject'], $email['body'], $email['headers'] );
     2315                wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
    23162316        }
    23172317
    23182318        /**
     
    24612461                 */
    24622462                $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results );
    24632463
    2464                 wp_mail( $email['to'], $email['subject'], $email['body'], $email['headers'] );
     2464                wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
    24652465        }
    24662466}
  • src/wp-admin/includes/ms.php

     
    259259        $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
    260260        $content = str_replace( '###SITEURL###', network_home_url(), $content );
    261261
    262         wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), get_option( 'blogname' ) ), $content );
     262        wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
    263263}
    264264add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
    265265add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
     
    328328                $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
    329329                $content = str_replace( '###SITEURL###', network_home_url(), $content );
    330330
    331                 wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), get_option( 'blogname' ) ), $content );
     331                wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
    332332                $_POST['email'] = $current_user->user_email;
    333333        }
    334334}
  • src/wp-admin/ms-delete-site.php

     
    6868        $content = str_replace( '###URL_DELETE###', $url_delete, $content );
    6969        $content = str_replace( '###SITE_NAME###', $current_site->site_name, $content );
    7070
    71         wp_mail( get_option( 'admin_email' ), "[ " . get_option( 'blogname' ) . " ] ".__( 'Delete My Site' ), $content );
     71        wp_mail( get_option( 'admin_email' ), "[ " . wp_specialchars_decode( get_option( 'blogname' ) ) . " ] ".__( 'Delete My Site' ), $content );
    7272        ?>
    7373
    7474        <p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked. ') ?></p>
  • src/wp-admin/user-new.php

     
    8585
    8686Please click the following link to confirm the invite:
    8787%4$s' );
    88                         wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), get_option( 'blogname' ) ), sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) ), home_url( "/newbloguser/$newuser_key/" ) ) );
     88                        wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) ), home_url( "/newbloguser/$newuser_key/" ) ) );
    8989                        $redirect = add_query_arg( array('update' => 'add'), 'user-new.php' );
    9090                }
    9191        }
  • src/wp-includes/ms-functions.php

     
    880880                $from_name,
    881881                esc_url( 'http://' . $domain . $path )
    882882        );
    883         wp_mail($user_email, $subject, $message, $message_headers);
     883        wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
    884884        return true;
    885885}
    886886
     
    965965                $from_name,
    966966                $user
    967967        );
    968         wp_mail($user_email, $subject, $message, $message_headers);
     968        wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
    969969        return true;
    970970}
    971971
     
    15191519         * @param string $subject Subject of the email.
    15201520         */
    15211521        $subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_site->site_name, wp_unslash( $title ) ) );
    1522         wp_mail($user->user_email, $subject, $message, $message_headers);
     1522        wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
    15231523        return true;
    15241524}
    15251525
     
    15971597         * @param string $subject Subject of the email.
    15981598         */
    15991599        $subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_site->site_name, $user->user_login) );
    1600         wp_mail($user->user_email, $subject, $message, $message_headers);
     1600        wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
    16011601        return true;
    16021602}
    16031603
  • src/wp-includes/pluggable.php

     
    11561156        $message_headers = apply_filters( 'comment_notification_headers',    $message_headers, $comment_id );
    11571157
    11581158        foreach ( $emails as $email ) {
    1159                 @wp_mail( $email, $subject, $notify_message, $message_headers );
     1159                @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
    11601160        }
    11611161
    11621162        return true;
     
    12431243        $message_headers = apply_filters( 'comment_moderation_headers',    $message_headers, $comment_id );
    12441244
    12451245        foreach ( $emails as $email ) {
    1246                 @wp_mail( $email, $subject, $notify_message, $message_headers );
     1246                @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
    12471247        }
    12481248
    12491249        return true;
  • src/wp-login.php

     
    388388         */
    389389        $message = apply_filters( 'retrieve_password_message', $message, $key );
    390390
    391         if ( $message && !wp_mail($user_email, $title, $message) )
     391        if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) )
    392392                wp_die( __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );
    393393
    394394        return true;