We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90ff6a5 commit 38846bcCopy full SHA for 38846bc
template/search_template.js
@@ -7,7 +7,9 @@ $(function(){
7
this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" );
8
},
9
_renderItem: function( ul, item) {
10
- var regex = new RegExp('(' + current_search + ')', 'ig');
+ var regex = new RegExp('('
11
+ + current_search.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
12
+ + ')', 'ig');
13
var text = item.label.replace(regex, '<b>$1</b>');
14
return $( "<li>" )
15
.append( $( "<div>" ).html(text) )
0 commit comments