Make WordPress Core


Ignore:
Timestamp:
10/17/2022 06:11:58 PM (2 years ago)
Author:
audrasjb
Message:

Grouped backports to the 5.1 branch.

  • Media: Refactor search by filename within the admin,
  • REST API: Lockdown post parameter of the terms endpoint,
  • Customize: Escape blogname option in underscores templates,
  • Query: Validate relation in WP_Date_Query,
  • 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,
  • Mail: Reset PHPMailer properties between use,
  • Widgets: Escape RSS error messages for display.

Merges [54521-54530] to the 5.1 branch.
Props voldemortensen, johnbillion, paulkevan, peterwilsoncc, xknown, dd32, audrasjb, martinkrcho, vortfu, davidbaumwald, tykoted, timothyblynjacobs, johnjamesjacoby, ehtis, matveb, talldanwp.

Location:
branches/5.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.1

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

    r47918 r54570  
    22842284    }
    22852285
     2286    $filter_comment = false;
     2287    if ( ! has_filter( 'pre_comment_content', 'wp_filter_kses' ) ) {
     2288        $filter_comment = ! user_can( isset( $comment['user_id'] ) ? $comment['user_id'] : 0, 'unfiltered_html' );
     2289    }
     2290
     2291    if ( $filter_comment ) {
     2292        add_filter( 'pre_comment_content', 'wp_filter_kses' );
     2293    }
     2294
    22862295    // Escape data pulled from DB.
    22872296    $comment = wp_slash( $comment );
     
    22932302
    22942303    $commentarr = wp_filter_comment( $commentarr );
     2304
     2305    if ( $filter_comment ) {
     2306        remove_filter( 'pre_comment_content', 'wp_filter_kses' );
     2307    }
    22952308
    22962309    // Now extract the merged array.
Note: See TracChangeset for help on using the changeset viewer.