Skip to content

Commit 264198f

Browse files
author
Tomas Kirda
authored
Merge pull request #510 from stonio/patch-4
Shorter RegEx in escapeRegExChars
2 parents b45b4b1 + 22e8d7b commit 264198f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
utils = (function () {
3030
return {
3131
escapeRegExChars: function (value) {
32-
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
32+
return value.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
3333
},
3434
createNode: function (containerClass) {
3535
var div = document.createElement('div');

0 commit comments

Comments
 (0)