File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 127127 $ . Autocomplete = Autocomplete ;
128128
129129 Autocomplete . formatResult = function ( suggestion , currentValue ) {
130- var htmlSafeString = suggestion . value
130+ var pattern = '(' + utils . escapeRegExChars ( currentValue ) + ')' ;
131+
132+ return suggestion . value
133+ . replace ( new RegExp ( pattern , 'gi' ) , '<strong>$1<\/strong>' )
131134 . replace ( / & / g, '&' )
132135 . replace ( / < / g, '<' )
133136 . replace ( / > / g, '>' )
134- . replace ( / " / g, '"' ) ;
135-
136- var pattern = '(' + utils . escapeRegExChars ( currentValue ) + ')' ;
137-
138- return htmlSafeString . replace ( new RegExp ( pattern , 'gi' ) , '<strong>$1<\/strong>' ) ;
137+ . replace ( / " / g, '"' )
138+ . replace ( / & l t ; ( \/ ? s t r o n g ) & g t ; / g, '<$1>' ) ;
139139 } ;
140140
141141 Autocomplete . prototype = {
You can’t perform that action at this time.
0 commit comments