Make WordPress Core

Ticket #43542: 43542.2.diff

File 43542.2.diff, 3.2 KB (added by lbenicio, 7 years ago)
  • src/wp-admin/includes/template.php

    diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
    index b89a899d55..6044469037 100644
    a b function do_meta_boxes( $screen, $context, $object ) { 
    10991099
    11001100        $hidden = get_hidden_meta_boxes( $screen );
    11011101
    1102         printf( '<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars( $context ) );
     1102        printf( '<div id="%s-sortables" class="meta-box-sortables">', esc_attr( $context, $flags = NULL, $encoding = 'UTF-8' ) );
    11031103
    11041104        // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
    11051105        if ( ! $already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
  • src/wp-includes/class-wp-editor.php

    diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php
    index bd5dda7e8a..3947343568 100644
    a b final class _WP_Editors { 
    284284                        remove_filter( 'the_editor_content', 'format_for_editor' );
    285285                }
    286286
     287                // Back-compat for the `htmledit_pre` and `richedit_pre` filters
    287288                // Back-compat for the `htmledit_pre` and `richedit_pre` filters
    288289                if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) {
    289                         // TODO: needs _deprecated_filter(), use _deprecated_function() as substitute for now
    290                         _deprecated_function( 'add_filter( htmledit_pre )', '4.3.0', 'add_filter( format_for_editor )' );
    291                         $content = apply_filters( 'htmledit_pre', $content );
     290                        $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' );
    292291                } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) {
    293                         _deprecated_function( 'add_filter( richedit_pre )', '4.3.0', 'add_filter( format_for_editor )' );
    294                         $content = apply_filters( 'richedit_pre', $content );
     292                        $content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' );
    295293                }
    296294
    297295                if ( false !== stripos( $content, 'textarea' ) ) {
  • src/wp-includes/pluggable.php

    diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
    index cb06297b57..1e7f5598a6 100644
    a b if ( ! function_exists( 'wp_mail' ) ) : 
    454454                $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset );
    455455
    456456                // Set custom headers
    457                 if ( ! empty( $headers ) ) {
    458                         foreach ( (array) $headers as $name => $content ) {
    459                                 $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
    460                         }
     457                if ( !empty( $headers ) ) {
     458      foreach ( (array) $headers as $name => $content ) {
     459        // Only add custom header if not one that will be added automatically
     460        // by wp-includes/class-phpmailer.php
     461        if ( ( 'MIME-Version' !== $name ) && ( 'X-Mailer' !== $name ) ) {
     462          $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
     463                                }
     464    }
    461465
    462466                        if ( false !== stripos( $content_type, 'multipart' ) && ! empty( $boundary ) ) {
    463467                                $phpmailer->addCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
    if ( ! function_exists( 'wp_text_diff' ) ) : 
    27332737                return $r;
    27342738        }
    27352739endif;
    2736