mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
Composer: Escape special characters in regex
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