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

git-svn-id: https://develop.svn.wordpress.org/trunk@27507 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2014-03-11 22:23:51 +00:00
parent 961899214e
commit f45c06c09c
2 changed files with 6 additions and 3 deletions

View File

@ -177,9 +177,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
if ( is_null( $term ) )
$term = wp_unslash( $_REQUEST['s'] );
foreach ( $plugin as $value )
if ( stripos( $value, $term ) !== false )
foreach ( $plugin as $value ) {
if ( false !== stripos( strip_tags( $value ), $term ) ) {
return true;
}
}
return false;
}

View File

@ -222,8 +222,9 @@ class WP_Themes_List_Table extends WP_List_Table {
foreach ( array( 'Name', 'Description', 'Author', 'AuthorURI' ) as $header ) {
// Don't mark up; Do translate.
if ( false !== stripos( $theme->display( $header, false, true ), $word ) )
if ( false !== stripos( strip_tags( $theme->display( $header, false, true ) ), $word ) ) {
continue 2;
}
}
if ( false !== stripos( $theme->get_stylesheet(), $word ) )