1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-17 02:49:54 +00:00

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
This commit is contained in:
jeremy@jermolene.com 2021-06-27 21:27:57 +01:00
parent a409536ad0
commit 338b7c92a2

View File

@ -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) {