sanitize note title && attrs just to be sure

This commit is contained in:
zadam
2022-07-06 23:09:16 +02:00
parent 4fc686bbbc
commit 12b3302687
6 changed files with 24 additions and 2 deletions

View File

@@ -241,7 +241,7 @@ function getNoteTitle(filePath, replaceUnderscoresWithSpaces, noteMeta) {
return noteMeta.title;
} else {
const basename = path.basename(removeTextFileExtension(filePath));
if(replaceUnderscoresWithSpaces) {
if (replaceUnderscoresWithSpaces) {
return basename.replace(/_/g, ' ').trim();
}
return basename;