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

Built from https://develop.svn.wordpress.org/trunk@27507


git-svn-id: http://core.svn.wordpress.org/trunk@27350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-03-11 22:24:15 +00:00
parent f0f492a030
commit 75b86ecfb0
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 ) ) if ( is_null( $term ) )
$term = wp_unslash( $_REQUEST['s'] ); $term = wp_unslash( $_REQUEST['s'] );
foreach ( $plugin as $value ) foreach ( $plugin as $value ) {
if ( stripos( $value, $term ) !== false ) if ( false !== stripos( strip_tags( $value ), $term ) ) {
return true; return true;
}
}
return false; return false;
} }

View File

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