diff --git a/backend/export.py b/backend/export.py index 1020bb3..06bdb47 100644 --- a/backend/export.py +++ b/backend/export.py @@ -348,8 +348,8 @@ def generate_export_html( - - - - - - - - - - - -
- ${renderedHTML} -
- -`; - - // Create blob and download - const blob = new Blob([htmlDocument], { type: 'text/html;charset=utf-8' }); - const url = URL.createObjectURL(blob); + // Download as blob + const blob = await response.blob(); + const blobUrl = URL.createObjectURL(blob); const a = document.createElement('a'); - a.href = url; - a.download = `${noteName}.html`; + a.href = blobUrl; + a.download = filename; document.body.appendChild(a); a.click(); // Cleanup - URL.revokeObjectURL(url); + URL.revokeObjectURL(blobUrl); document.body.removeChild(a); } catch (error) { diff --git a/frontend/index.html b/frontend/index.html index 0352301..09a9ab7 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -70,8 +70,8 @@