regex - no need to escape special characters inside []

This commit is contained in:
psychobunny
2014-04-14 17:42:47 -04:00
parent e5486db1ae
commit 3c711d72fb

View File

@@ -274,7 +274,7 @@ define(['taskbar'], function(taskbar) {
} }
function escapeRegExp(text) { function escapeRegExp(text) {
return text.replace(/[\-\[\]\{\}\(\)\*\+\?\.\,\\\^\$\|\#\s]/g, "\\$&"); return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
} }
function uploadContentFiles(params) { function uploadContentFiles(params) {