Make WordPress Core

Ticket #12584: 12584.2.patch

File 12584.2.patch, 5.3 KB (added by leemon, 9 years ago)

Refreshed patch

  • src/wp-includes/pluggable.php

     
    14571457        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    14581458        // we want to reverse this for the plain text arena of emails.
    14591459        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    1460 
     1460        $comment_content = wp_specialchars_decode( $comment->comment_content );
     1461       
    14611462        switch ( $comment->comment_type ) {
    14621463                case 'trackback':
    14631464                        $notify_message  = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
     
    14641465                        /* translators: 1: website name, 2: website IP, 3: website hostname */
    14651466                        $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    14661467                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1467                         $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1468                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    14681469                        $notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n";
    14691470                        /* translators: 1: blog name, 2: post title */
    14701471                        $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
     
    14741475                        /* translators: 1: website name, 2: website IP, 3: website hostname */
    14751476                        $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    14761477                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1477                         $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1478                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    14781479                        $notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n";
    14791480                        /* translators: 1: blog name, 2: post title */
    14801481                        $subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
     
    14851486                        $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    14861487                        $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    14871488                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1488                         $notify_message .= sprintf( __('Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1489                        $notify_message .= sprintf( __('Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    14891490                        $notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n";
    14901491                        /* translators: 1: blog name, 2: post title */
    14911492                        $subject = sprintf( __('[%1$s] Comment: "%2$s"'), $blogname, $post->post_title );
     
    15921593        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    15931594        // we want to reverse this for the plain text arena of emails.
    15941595        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
     1596        $comment_content = wp_specialchars_decode( $comment->comment_content );
    15951597
    15961598        switch ( $comment->comment_type ) {
    15971599                case 'trackback':
     
    16001602                        /* translators: 1: website name, 2: website IP, 3: website hostname */
    16011603                        $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    16021604                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1603                         $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
     1605                        $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
    16041606                        break;
    16051607                case 'pingback':
    16061608                        $notify_message  = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
     
    16081610                        /* translators: 1: website name, 2: website IP, 3: website hostname */
    16091611                        $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    16101612                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1611                         $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
     1613                        $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
    16121614                        break;
    16131615                default: // Comments
    16141616                        $notify_message  = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
     
    16161618                        $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    16171619                        $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    16181620                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1619                         $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1621                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    16201622                        break;
    16211623        }
    16221624