diff --git a/plugins/tiddlywiki/multiwikiserver/modules/commands/mws-save-archive.js b/plugins/tiddlywiki/multiwikiserver/modules/commands/mws-save-archive.js index e4f8e14e1..d8b67753c 100644 --- a/plugins/tiddlywiki/multiwikiserver/modules/commands/mws-save-archive.js +++ b/plugins/tiddlywiki/multiwikiserver/modules/commands/mws-save-archive.js @@ -45,14 +45,14 @@ function saveArchive(archivePath) { } for(const recipeInfo of $tw.mws.store.listRecipes()) { console.log(`Recipe ${recipeInfo.recipe_name}`); - saveJsonFile(`recipes/${encodeURIComponent(recipeInfo.recipe_name)}.json`,recipeInfo); + saveJsonFile(`recipes/${$tw.utils.encodeURIComponentExtended(recipeInfo.recipe_name)}.json`,recipeInfo); } for(const bagInfo of $tw.mws.store.listBags()) { console.log(`Bag ${bagInfo.bag_name}`); - saveJsonFile(`bags/${encodeURIComponent(bagInfo.bag_name)}/meta.json`,bagInfo); + saveJsonFile(`bags/${$tw.utils.encodeURIComponentExtended(bagInfo.bag_name)}/meta.json`,bagInfo); for(const title of $tw.mws.store.getBagTiddlers(bagInfo.bag_name)) { const tiddlerInfo = $tw.mws.store.getBagTiddler(title,bagInfo.bag_name); - saveJsonFile(`bags/${encodeURIComponent(bagInfo.bag_name)}/tiddlers/${encodeURIComponent(title)}.json`,tiddlerInfo.tiddler); + saveJsonFile(`bags/${$tw.utils.encodeURIComponentExtended(bagInfo.bag_name)}/tiddlers/${$tw.utils.encodeURIComponentExtended(title)}.json`,tiddlerInfo.tiddler); } } } diff --git a/plugins/tiddlywiki/multiwikiserver/modules/store/sql-tiddler-store.js b/plugins/tiddlywiki/multiwikiserver/modules/store/sql-tiddler-store.js index 7c85a1190..c6d70aa0e 100644 --- a/plugins/tiddlywiki/multiwikiserver/modules/store/sql-tiddler-store.js +++ b/plugins/tiddlywiki/multiwikiserver/modules/store/sql-tiddler-store.js @@ -133,7 +133,7 @@ SqlTiddlerStore.prototype.processOutgoingTiddler = function(tiddlerFields,tiddle tiddlerFields, { text: undefined, - _canonical_uri: `/bags/${encodeURIComponent(bag_name)}/tiddlers/${encodeURIComponent(tiddlerFields.title)}/blob` + _canonical_uri: `/bags/${$tw.utils.encodeURIComponentExtended(bag_name)}/tiddlers/${$tw.utils.encodeURIComponentExtended(tiddlerFields.title)}/blob` } ); } else {