WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/17/2016 08:14:37 PM (5 years ago)
Author:
ocean90
Message:

Plugins: Remove slashes from search terms and use urldecode() in non-URL contexts.

Fixes #35712.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r36302 r36560  
    269269
    270270    /**
    271      * @global string $s
     271     * @global string $s URL encoded search term.
    272272     *
    273273     * @param array $plugin
     
    278278
    279279        foreach ( $plugin as $value ) {
    280             if ( is_string( $value ) && false !== stripos( strip_tags( $value ), $s ) ) {
     280            if ( is_string( $value ) && false !== stripos( strip_tags( $value ), urldecode( $s ) ) ) {
    281281                return true;
    282282            }
     
    317317
    318318        if ( ! empty( $_REQUEST['s'] ) ) {
    319             $s = esc_html( $_REQUEST['s'] );
     319            $s = esc_html( wp_unslash( $_REQUEST['s'] ) );
    320320
    321321            printf( __( 'No plugins found for “%s”.' ), $s );
Note: See TracChangeset for help on using the changeset viewer.