mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Autocomplete: Use $.ui.autocomplete.escapeRegex in combobox demo; Fixes #5436 Autocomplete: use $.ui.autocomplete.escapeRegex in combox demo
This commit is contained in:
parent
b297b3fa6a
commit
56a3d4cbff
@ -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"), "<strong>$1</strong>"),
|
||||
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
|
||||
value: text
|
||||
};
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user