Makes filenames safe when saving file.

This commit is contained in:
2025-07-12 17:06:45 -06:00
parent ca38d03dc2
commit 4bf06fa6ea

View File

@@ -2456,7 +2456,7 @@ export const saveFile = async (data, sender, isFromExtension, snackMethods) => {
locationUrl + `?attachment=true&attachmentFilename=${data?.filename}` locationUrl + `?attachment=true&attachmentFilename=${data?.filename}`
); );
a.href = endpoint; a.href = endpoint;
a.download = data.filename; a.download = encodeURIComponent(data.filename);
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
a.remove(); a.remove();