From 68c06a76bf67a9e994d6e97104ce53d0956a6abd Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 26 May 2012 23:15:09 +0200 Subject: [PATCH] fix Ox.replaceRegExp --- source/Ox/js/RegExp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox/js/RegExp.js b/source/Ox/js/RegExp.js index a1a2aeb5..55d45792 100644 --- a/source/Ox/js/RegExp.js +++ b/source/Ox/js/RegExp.js @@ -5,5 +5,5 @@ Ox.escapeRegExp Escapes a string for use in a regular expression @*/ // see https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions Ox.escapeRegExp = function(string) { - return (string + '').replace(/([\/\\^$*+?.-|(){}[\]])/g, '\\$1'); + return (string + '').replace(/([\/\\\^\$\*\+\?\.\-\|\(\)\{\}\[\]])/g, '\\$1'); }; \ No newline at end of file