mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 06:58:02 +02:00
regex - no need to escape special characters inside []
This commit is contained in:
@@ -274,7 +274,7 @@ define(['taskbar'], function(taskbar) {
|
||||
}
|
||||
|
||||
function escapeRegExp(text) {
|
||||
return text.replace(/[\-\[\]\{\}\(\)\*\+\?\.\,\\\^\$\|\#\s]/g, "\\$&");
|
||||
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
||||
}
|
||||
|
||||
function uploadContentFiles(params) {
|
||||
|
||||
Reference in New Issue
Block a user