Skip to content

Commit

Permalink
update valid text
Browse files Browse the repository at this point in the history
  • Loading branch information
cuinjune committed May 6, 2021
1 parent 4679f39 commit af2c3e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit af2c3e4

Please sign in to comment.