diff --git a/packages/nocodb/src/lib/meta/NcMetaMgr.ts b/packages/nocodb/src/lib/meta/NcMetaMgr.ts index bc08693641..0c950cc671 100644 --- a/packages/nocodb/src/lib/meta/NcMetaMgr.ts +++ b/packages/nocodb/src/lib/meta/NcMetaMgr.ts @@ -4551,7 +4551,9 @@ export default class NcMetaMgr { 'Access-Control-Expose-Headers': 'nc-export-offset', 'nc-export-offset': csvData.offset, 'nc-export-elapsed-time': csvData.elapsed, - 'Content-Disposition': `attachment; filename="${args.args.model_name}-export.csv"` + 'Content-Disposition': `attachment; filename="${encodeURI( + args.args.model_name + )}-export.csv"` }); res.send(csvData.data); } diff --git a/packages/nocodb/src/lib/meta/api/dataApis/dataAliasExportApis.ts b/packages/nocodb/src/lib/meta/api/dataApis/dataAliasExportApis.ts index c167aee66a..b0bb7b32fc 100644 --- a/packages/nocodb/src/lib/meta/api/dataApis/dataAliasExportApis.ts +++ b/packages/nocodb/src/lib/meta/api/dataApis/dataAliasExportApis.ts @@ -15,7 +15,9 @@ async function csvDataExport(req: Request, res: Response) { 'Access-Control-Expose-Headers': 'nc-export-offset', 'nc-export-offset': offset, 'nc-export-elapsed-time': elapsed, - 'Content-Disposition': `attachment; filename="${view.title}-export.csv"` + 'Content-Disposition': `attachment; filename="${encodeURI( + view.title + )}-export.csv"` }); res.send(data); } diff --git a/packages/nocodb/src/lib/meta/api/exportApis.ts b/packages/nocodb/src/lib/meta/api/exportApis.ts index e298d8b0c7..f661414aac 100644 --- a/packages/nocodb/src/lib/meta/api/exportApis.ts +++ b/packages/nocodb/src/lib/meta/api/exportApis.ts @@ -11,7 +11,9 @@ async function exportCsv(req: Request, res: Response) { 'Access-Control-Expose-Headers': 'nc-export-offset', 'nc-export-offset': offset, 'nc-export-elapsed-time': elapsed, - 'Content-Disposition': `attachment; filename="${view.title}-export.csv"` + 'Content-Disposition': `attachment; filename="${encodeURI( + view.title + )}-export.csv"` }); res.send(data); } diff --git a/packages/nocodb/src/lib/meta/api/publicApis/publicDataExportApis.ts b/packages/nocodb/src/lib/meta/api/publicApis/publicDataExportApis.ts index 32d76b1028..1954d92a54 100644 --- a/packages/nocodb/src/lib/meta/api/publicApis/publicDataExportApis.ts +++ b/packages/nocodb/src/lib/meta/api/publicApis/publicDataExportApis.ts @@ -122,7 +122,9 @@ async function exportCsv(req: Request, res: Response) { 'Access-Control-Expose-Headers': 'nc-export-offset', 'nc-export-offset': offset, 'nc-export-elapsed-time': elapsed, - 'Content-Disposition': `attachment; filename="${view.title}-export.csv"` + 'Content-Disposition': `attachment; filename="${encodeURI( + view.title + )}-export.csv"` }); res.send(data); }