mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-14 21:21:07 +02: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