Ensure tiddlers with fieldnames containing colons don't get saved in .tid file format

Prompted by discussion over at https://github.com/Jermolene/TiddlyWiki5/pull/5708#issuecomment-862399985
new-json-store-area
jeremy@jermolene.com 2021-06-27 21:27:57 +01:00
rodzic a409536ad0
commit 338b7c92a2
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -228,6 +228,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
hasUnsafeFields = hasUnsafeFields || /[\x00-\x1F]/mg.test(value);
hasUnsafeFields = hasUnsafeFields || ($tw.utils.trim(value) !== value);
}
hasUnsafeFields = hasUnsafeFields || /:/mg.test(fieldName);
});
// Check for field values
if(hasUnsafeFields) {