diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-07-05 10:05:00 +0200 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-07-05 10:06:16 +0200 |
commit | 0bbbe5f5b1ca98dd4713064c08e908dc7b2a5ede (patch) | |
tree | e53c5a084839e14bb72017b8c1a627e9ef9a4889 | |
parent | 7d24c1a57ffcfa461dc48f6024b33e548179c491 (diff) | |
download | jquery-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.js | 2 |
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" ); |