From 21dadb10e814ed4cfdf2ea8f9544eddacc05bc6b Mon Sep 17 00:00:00 2001 From: Gildas Date: Sat, 9 Nov 2024 01:36:49 +0100 Subject: [PATCH] use full-width symbols to replace invalid file name character (see https://github.com/gildas-lormeau/SingleFile/issues/1614) --- build.sh | 2 +- single-file-cli-api.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index cac9da6..d7203bb 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ mv package.json package.json.tmp mv deno.json deno.json.tmp mv deno.lock deno.lock.tmp -deno install --vendor --quiet "npm:single-file-core@1.5.39" +deno install --vendor --quiet "npm:single-file-core@1.5.40" mv package.json.tmp package.json mv deno.json.tmp deno.json mv deno.lock.tmp deno.lock diff --git a/single-file-cli-api.js b/single-file-cli-api.js index 1653f6a..d564420 100644 --- a/single-file-cli-api.js +++ b/single-file-cli-api.js @@ -39,8 +39,9 @@ const DEFAULT_OPTIONS = { filenameTemplate: "{page-title} ({date-locale} {time-locale}).html", filenameMaxLength: 192, filenameMaxLengthUnit: "bytes", - filenameReplacedCharacters: ["~", "+", "\\\\", "?", "%", "*", ":", "|", "\"", "<", ">", "\x00-\x1f", "\x7F"], + filenameReplacedCharacters: ["~", "+", "?", "%", "*", ":", "|", "\"", "<", ">", "\\\\", "\x00-\x1f", "\x7F"], filenameReplacementCharacter: "_", + filenameReplacementCharacters: ["~", "+", "?", "%", "*", ":", "|", """, "<", ">", "\"], maxResourceSize: 10, backgroundSave: true, removeAlternativeFonts: true,