aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-07-05 10:05:00 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-07-05 10:06:16 +0200
commit0bbbe5f5b1ca98dd4713064c08e908dc7b2a5ede (patch)
treee53c5a084839e14bb72017b8c1a627e9ef9a4889
parent7d24c1a57ffcfa461dc48f6024b33e548179c491 (diff)
downloadjquery-ui-0bbbe5f5b1ca98dd4713064c08e908dc7b2a5ede.tar.gz
jquery-ui-0bbbe5f5b1ca98dd4713064c08e908dc7b2a5ede.zip
Autocomplete: Updated escapeRegex utility based on http://xregexp.com/xregexp.js
-rw-r--r--ui/jquery.ui.autocomplete.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index bd7420df8..c9dd11609 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -316,7 +316,7 @@ $.widget( "ui.autocomplete", {
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
- return value.replace( /([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1" );
+ return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
filter: function(array, term) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );