Make WordPress Core


Ignore:
Timestamp:
10/17/2022 05:39:41 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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

Location:
branches/3.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src

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

    r25868 r54546  
    15091509        return 0;
    15101510
     1511    $filter_comment = false;
     1512    if ( ! has_filter( 'pre_comment_content', 'wp_filter_kses' ) ) {
     1513        $filter_comment = ! user_can( isset( $comment['user_id'] ) ? $comment['user_id'] : 0, 'unfiltered_html' );
     1514    }
     1515
     1516    if ( $filter_comment ) {
     1517        add_filter( 'pre_comment_content', 'wp_filter_kses' );
     1518    }
     1519
    15111520    // Escape data pulled from DB.
    15121521    $comment = wp_slash($comment);
     
    15181527
    15191528    $commentarr = wp_filter_comment( $commentarr );
     1529
     1530    if ( $filter_comment ) {
     1531        remove_filter( 'pre_comment_content', 'wp_filter_kses' );
     1532    }
    15201533
    15211534    // Now extract the merged array.
Note: See TracChangeset for help on using the changeset viewer.