fix: explicitly set a charset for rendered HTML documents (#355)

This commit is contained in:
Liran Tal
2023-08-18 08:49:39 +03:00
committed by GitHub
parent 57514f8771
commit e20fa3c2ec
+2 -2
View File
@@ -74,7 +74,7 @@ function serveTheBots(
{
// Use onAllReady to wait for the entire document to be ready
onAllReady() {
responseHeaders.set("Content-Type", "text/html");
responseHeaders.set("Content-Type", "text/html; charset=utf-8");
let body = new PassThrough();
pipe(body);
resolve(
@@ -114,7 +114,7 @@ function serveBrowsers(
// use onShellReady to wait until a suspense boundary is triggered
onShellReady() {
shellReady = true;
responseHeaders.set("Content-Type", "text/html");
responseHeaders.set("Content-Type", "text/html; charset=utf-8");
let body = new PassThrough();
pipe(body);
resolve(