Make WordPress Core


Ignore:
Timestamp:
10/17/2022 05:46:53 PM (21 months ago)
Author:
SergeyBiryukov
Message:

Grouped backports to the 3.9 branch.

  • Posts, Post types: Apply KSES to post-by-email content,
  • General: Validate host on "Are you sure?" screen,
  • Posts, Post types: Remove emails from post-by-email logs,
  • Pings/trackbacks: Apply KSES to all trackbacks,
  • Comments: Apply kses when editing comments,
  • Mail: Reset PHPMailer properties between use,
  • Widgets: Escape RSS error messages for display.

Merges [54521], [54522], [54523], [54525], [54527], [54529], [54541] to the 3.9 branch.
Props voldemortensen, johnbillion, paulkevan, peterwilsoncc, xknown, dd32, audrasjb, martinkrcho, davidbaumwald, tykoted, matveb, talldanwp.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/src/wp-includes/comment.php

    r27300 r54550  
    18161816        return 0;
    18171817
     1818    $filter_comment = false;
     1819    if ( ! has_filter( 'pre_comment_content', 'wp_filter_kses' ) ) {
     1820        $filter_comment = ! user_can( isset( $comment['user_id'] ) ? $comment['user_id'] : 0, 'unfiltered_html' );
     1821    }
     1822
     1823    if ( $filter_comment ) {
     1824        add_filter( 'pre_comment_content', 'wp_filter_kses' );
     1825    }
     1826
    18181827    // Escape data pulled from DB.
    18191828    $comment = wp_slash($comment);
     
    18251834
    18261835    $commentarr = wp_filter_comment( $commentarr );
     1836
     1837    if ( $filter_comment ) {
     1838        remove_filter( 'pre_comment_content', 'wp_filter_kses' );
     1839    }
    18271840
    18281841    // Now extract the merged array.
Note: See TracChangeset for help on using the changeset viewer.