diff --git a/app.py b/app.py index dafbbca..84713f7 100644 --- a/app.py +++ b/app.py @@ -142,7 +142,8 @@ es.onmessage = (e) => { titleEl.textContent = 'Error generating page'; document.querySelector('.subtitle').textContent = 'Please refresh and try again'; } else { - const decoded = atob(e.data); + const bytes = Uint8Array.from(atob(e.data), c => c.charCodeAt(0)); + const decoded = new TextDecoder().decode(bytes); htmlChunks.push(decoded); htmlSize += decoded.length; chars = htmlSize;