Make WordPress Core

Ticket #39041: 39041.diff

File 39041.diff, 477 bytes (added by hesyifei, 6 years ago)
  • src/js/_enqueues/wp/theme.js

     
    180180                // Start with a full collection
    181181                this.reset( themes.data.themes, { silent: true } );
    182182
     183                // Trim the term
     184                term = term.trim();
     185
    183186                // Escape the term string for RegExp meta characters
    184187                term = term.replace( /[-\/\\^$*+?.()|[\]{}]/g, '\\$&' );
    185188