soumaeda пре 2 година
родитељ
комит
82da277601
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      apps/app/src/server/routes/apiv3/page.js

+ 1 - 2
apps/app/src/server/routes/apiv3/page.js

@@ -618,7 +618,6 @@ module.exports = (crowi) => {
     }
     }
 
 
     const fileName = path.basename(pagePath);
     const fileName = path.basename(pagePath);
-    const sanitizedFileName = fileName.replace(/[\\/:;"*?<>,-」ˆ|]/g, '_');
     let stream;
     let stream;
 
 
     try {
     try {
@@ -630,7 +629,7 @@ module.exports = (crowi) => {
     }
     }
 
 
     res.set({
     res.set({
-      'Content-Disposition': `attachment;filename*=UTF-8''${encodeURIComponent(sanitizedFileName)}.${format}`,
+      'Content-Disposition': `attachment;filename*=UTF-8''${encodeURIComponent(fileName.replace(/[\\/:;"*?<>,」ˆ|]/g, '_'))}.${format}`,
     });
     });
 
 
     const parameters = {
     const parameters = {