From: jzaefferer Date: Fri, 26 Mar 2010 14:59:34 +0000 (-0400) Subject: Autocomplete: Use $.ui.autocomplete.escapeRegex in combobox demo; Fixes #5436 Autocom... X-Git-Tag: 1.8.1~5^2~62^2~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=56a3d4cbff390dcca57d33a9e23325d76f7300f2;p=jquery-ui.git Autocomplete: Use $.ui.autocomplete.escapeRegex in combobox demo; Fixes #5436 Autocomplete: use $.ui.autocomplete.escapeRegex in combox demo --- diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index e5dc6c92b..4c6b656a1 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -33,7 +33,7 @@ if (!request.term || matcher.test(text)) return { id: $(this).val(), - label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"), + label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"), value: text }; }));