diff --git a/src/js/modules/export.js b/src/js/modules/export.js index 6da827a..2b8edc2 100644 --- a/src/js/modules/export.js +++ b/src/js/modules/export.js @@ -55,9 +55,8 @@ async function exportPNG() { const width = parseFloat(viewBox[2]) * window.devicePixelRatio; const height = parseFloat(viewBox[3]) * window.devicePixelRatio; - const encoded = - "data:image/svg+xml;base64," + - btoa(unescape(encodeURIComponent(new XMLSerializer().serializeToString(svgEl)))); + const blob = new Blob([new XMLSerializer().serializeToString(svgEl)], {type: 'image/svg+xml'}); + const encoded = URL.createObjectURL(blob); const tempImg = new Image(); const loadImage = () => {