From dec96815edea28ffb32d06f24a97c1207a5cc130 Mon Sep 17 00:00:00 2001 From: vincywindy <30209724+vincywindy@users.noreply.github.com> Date: Fri, 24 May 2024 09:28:00 +0800 Subject: [PATCH] Fix rom.name char error --- backend/endpoints/rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/endpoints/rom.py b/backend/endpoints/rom.py index 8c12b245c..0438fa503 100644 --- a/backend/endpoints/rom.py +++ b/backend/endpoints/rom.py @@ -156,7 +156,7 @@ def head_rom_content(request: Request, id: int, file_name: str): path=rom_path if not rom.multi else f"{rom_path}/{rom.files[0]}", filename=file_name, headers={ - "Content-Disposition": f'attachment; filename="{rom.name}.zip"', + "Content-Disposition": f'attachment; filename="{quote(rom.name)}.zip"', "Content-Type": "application/zip", "Content-Length": str(rom.file_size_bytes), },