Ticket #27561: 27561.diff
File 27561.diff, 1.1 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/theme.js
165 165 // Performs a search within the collection 166 166 // @uses RegExp 167 167 search: function( term ) { 168 var match, results, haystack ;168 var match, results, haystack, name, description, author; 169 169 170 170 // Start with a full collection 171 171 this.reset( themes.data.themes, { silent: true } ); … … 181 181 // Find results 182 182 // _.filter and .test 183 183 results = this.filter( function( data ) { 184 haystack = _.union( data.get( 'name' ), data.get( 'id' ), data.get( 'description' ), data.get( 'author' ), data.get( 'tags' ) ); 184 name = data.get( 'name' ).replace( /(<([^>]+)>)/ig, '' ); 185 description = data.get( 'description' ).replace( /(<([^>]+)>)/ig, '' ); 186 author = data.get( 'author' ).replace( /(<([^>]+)>)/ig, '' ); 187 188 haystack = _.union( name, data.get( 'id' ), description, author, data.get( 'tags' ) ); 185 189 186 190 if ( match.test( data.get( 'author' ) ) && term.length > 2 ) { 187 191 data.set( 'displayAuthor', true );