mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-01 16:13:00 +00:00
Extend encodeuricomponent to process additional characters (#7128)
* First commit * Fix version number in docs * Add code comment
This commit is contained in:
@@ -57,7 +57,7 @@ Command.prototype.execute = function() {
|
||||
exportPath = path.resolve(outputPath,macroPath + extension);
|
||||
}
|
||||
}
|
||||
var finalPath = exportPath || path.resolve(pathname,encodeURIComponent(title) + extension);
|
||||
var finalPath = exportPath || path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title) + extension);
|
||||
$tw.utils.createFileDirectories(finalPath);
|
||||
fs.writeFileSync(finalPath,text,"utf8");
|
||||
});
|
||||
|
||||
@@ -65,7 +65,7 @@ Command.prototype.execute = function() {
|
||||
$tw.utils.each(filteredPluginList,function(title) {
|
||||
var tiddler = containerData.tiddlers[title];
|
||||
// Save each JSON file and collect the skinny data
|
||||
var pathname = path.resolve(self.commander.outputPath,basepath + encodeURIComponent(title) + ".json");
|
||||
var pathname = path.resolve(self.commander.outputPath,basepath + $tw.utils.encodeURIComponentExtended(title) + ".json");
|
||||
$tw.utils.createFileDirectories(pathname);
|
||||
fs.writeFileSync(pathname,JSON.stringify(tiddler),"utf8");
|
||||
// Collect the skinny list data
|
||||
|
||||
@@ -45,7 +45,7 @@ Command.prototype.execute = function() {
|
||||
var tiddler = self.commander.wiki.getTiddler(title),
|
||||
type = tiddler.fields.type || "text/vnd.tiddlywiki",
|
||||
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
|
||||
filename = path.resolve(pathname,encodeURIComponent(title));
|
||||
filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title));
|
||||
fs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);
|
||||
});
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user