diff --git a/apps/readest-app/src/utils/misc.ts b/apps/readest-app/src/utils/misc.ts index df604fc4..c4de55d6 100644 --- a/apps/readest-app/src/utils/misc.ts +++ b/apps/readest-app/src/utils/misc.ts @@ -9,7 +9,7 @@ export const getContentMd5 = (content: unknown) => md5(JSON.stringify(content)); export const makeSafeFilename = (filename: string, replacement = '_') => { // Windows restricted characters + control characters and reserved names - const unsafeCharacters = /[<>:"\/\\|?*\x00-\x1F]/g; + const unsafeCharacters = /[<>:%"\/\\|?*\x00-\x1F]/g; const reservedFilenames = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i; // Unsafe to use filename including file extensions over 255 bytes on Android const maxFilenameBytes = 250;