Skip to content

Commit 56a3d4c

Browse files
committed
Autocomplete: Use $.ui.autocomplete.escapeRegex in combobox demo; Fixes #5436 Autocomplete: use $.ui.autocomplete.escapeRegex in combox demo
1 parent b297b3f commit 56a3d4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demos/autocomplete/combobox.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
if (!request.term || matcher.test(text))
3434
return {
3535
id: $(this).val(),
36-
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
36+
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
3737
value: text
3838
};
3939
}));

0 commit comments

Comments
 (0)