Skip to content

Commit

Permalink
Fixes blackberry bug according to @slik, thx!
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiomcosta committed Feb 22, 2011
1 parent f4a0ad8 commit e49239e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Slick.Parser.js
Expand Up @@ -63,7 +63,9 @@ var reverse = function(expression){
};

var escapeRegExp = function(string){// Credit: XRegExp 0.6.1 (c) 2007-2008 Steven Levithan <http://stevenlevithan.com/regex/xregexp/> MIT License
return string.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&");
return string.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, function(match){
return '\\' + match;
});
};

var regexp = new RegExp(
Expand Down

0 comments on commit e49239e

Please sign in to comment.