From 3c711d72fb6fef5679688885b6de4fbacb51d8f8 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 14 Apr 2014 17:42:47 -0400 Subject: [PATCH] regex - no need to escape special characters inside [] --- public/src/modules/composer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/modules/composer.js b/public/src/modules/composer.js index 5cbc4ca399..752350bd19 100644 --- a/public/src/modules/composer.js +++ b/public/src/modules/composer.js @@ -274,7 +274,7 @@ define(['taskbar'], function(taskbar) { } function escapeRegExp(text) { - return text.replace(/[\-\[\]\{\}\(\)\*\+\?\.\,\\\^\$\|\#\s]/g, "\\$&"); + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } function uploadContentFiles(params) {