diff --git a/html/app.js b/html/app.js
index 93cf3130..ca2009ce 100644
--- a/html/app.js
+++ b/html/app.js
@@ -426,10 +426,10 @@ CefSharp.BindObjectAsync(
}
}
if (error !== undefined) {
- text.push(error);
+ text.push(JSON.stringify(error));
}
if (extra !== undefined) {
- text.push(extra);
+ text.push(JSON.stringify(extra));
}
text = text.map((s) => escapeTag(s)).join('
');
if (text.length) {
diff --git a/html/vr.js b/html/vr.js
index b18de8d9..b2c2bbdc 100644
--- a/html/vr.js
+++ b/html/vr.js
@@ -362,7 +362,7 @@ CefSharp.BindObjectAsync(
}
}
if (error !== undefined) {
- text.push(error);
+ text.push(JSON.stringify(error));
}
text = text.map((s) => escapeTag(s)).join('
');
if (text.length) {