WordPress.org

Make WordPress Core

Changeset 27507


Ignore:
Timestamp:
03/11/2014 10:23:51 PM (7 years ago)
Author:
johnbillion
Message:

Avoid searching HTML tags when searching plugins and themes. Fixes #27136. Props enej.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

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

    r27356 r27507  
    178178            $term = wp_unslash( $_REQUEST['s'] );
    179179
    180         foreach ( $plugin as $value )
    181             if ( stripos( $value, $term ) !== false )
     180        foreach ( $plugin as $value ) {
     181            if ( false !== stripos( strip_tags( $value ), $term ) ) {
    182182                return true;
     183            }
     184        }
    183185
    184186        return false;
  • trunk/src/wp-admin/includes/class-wp-themes-list-table.php

    r27090 r27507  
    223223            foreach ( array( 'Name', 'Description', 'Author', 'AuthorURI' ) as $header ) {
    224224                // Don't mark up; Do translate.
    225                 if ( false !== stripos( $theme->display( $header, false, true ), $word ) )
     225                if ( false !== stripos( strip_tags( $theme->display( $header, false, true ) ), $word ) ) {
    226226                    continue 2;
     227                }
    227228            }
    228229
Note: See TracChangeset for help on using the changeset viewer.