From af2c3e4a1173b0ff5549c43ecadc3064c10db786 Mon Sep 17 00:00:00 2001 From: Zack Lee Date: Thu, 6 May 2021 18:04:47 -0400 Subject: [PATCH] update valid text --- models/project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/project.js b/models/project.js index 07f1e81..4b53ebd 100644 --- a/models/project.js +++ b/models/project.js @@ -310,7 +310,7 @@ projectSchema.statics.getValidText = function (text) { } if (/[^\x20-\x7E]/.test(newText)) { // replace all non-ascii characters to the closest ascii characters - newText = ASCIIFolder.foldReplacing(newText).replace(/[^\x20-\x7E]/g, "").trim(); + newText = ASCIIFolder.foldReplacing(newText).replace(/\0/g, "").trim(); } return newText; }