mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01: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