2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-09-19 16:59:01 +00:00

Shorter regex in escapeRegExChars

Removed unnecessary backslash characters.
Slash character is not a regex special character and does not need to be escaped.
This commit is contained in:
stonio 2016-07-06 15:06:21 +02:00 committed by GitHub
parent b45b4b1489
commit 22e8d7b1a5

View File

@ -29,7 +29,7 @@
utils = (function () {
return {
escapeRegExChars: function (value) {
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
return value.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
},
createNode: function (containerClass) {
var div = document.createElement('div');