regex - no need to escape special characters inside []

v1.18.x
psychobunny 11 years ago
parent e5486db1ae
commit 3c711d72fb

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

Loading…
Cancel
Save