Make WordPress Core


Ignore:
Timestamp:
10/17/2022 05:43:54 PM (18 months ago)
Author:
SergeyBiryukov
Message:

Grouped backports to the 3.8 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.8 branch.
Props voldemortensen, johnbillion, paulkevan, peterwilsoncc, xknown, dd32, audrasjb, martinkrcho, davidbaumwald, tykoted, matveb, talldanwp.

Location:
branches/3.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

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

    r26492 r54547  
    18331833        return 0;
    18341834
     1835    $filter_comment = false;
     1836    if ( ! has_filter( 'pre_comment_content', 'wp_filter_kses' ) ) {
     1837        $filter_comment = ! user_can( isset( $comment['user_id'] ) ? $comment['user_id'] : 0, 'unfiltered_html' );
     1838    }
     1839
     1840    if ( $filter_comment ) {
     1841        add_filter( 'pre_comment_content', 'wp_filter_kses' );
     1842    }
     1843
    18351844    // Escape data pulled from DB.
    18361845    $comment = wp_slash($comment);
     
    18421851
    18431852    $commentarr = wp_filter_comment( $commentarr );
     1853
     1854    if ( $filter_comment ) {
     1855        remove_filter( 'pre_comment_content', 'wp_filter_kses' );
     1856    }
    18441857
    18451858    // Now extract the merged array.
Note: See TracChangeset for help on using the changeset viewer.