summaryrefslogtreecommitdiff
path: root/tools/test-helper
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-06 12:37:08 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-06 12:37:08 +0100
commit3ecb0c754bc1777e002a43e4c34b27e676f9a95c (patch)
tree49dd299b6671058dd47b7dae84b748f117a962d3 /tools/test-helper
parentc2e458a133772a94009733040b39d58e781af977 (diff)
More math syntax
Diffstat (limited to 'tools/test-helper')
-rw-r--r--tools/test-helper/extension.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/test-helper/extension.js b/tools/test-helper/extension.js
index 253c78c7..60fbe71d 100644
--- a/tools/test-helper/extension.js
+++ b/tools/test-helper/extension.js
@@ -132,15 +132,19 @@ function getWebviewContent(pngSrc, refSrc, stdout, stderr) {
</div>
<h1>Standard output</h1>
- <pre>${stdout}</pre>
+ <pre>${escape(stdout)}</pre>
<h1>Standard error</h1>
- <pre>${stderr}</pre>
+ <pre>${escape(stderr)}</pre>
</body>
</html>
`
}
+function escape(text) {
+ return text.replace(/</g, "&lt;").replace(/>/g, "&gt;");
+}
+
function deactivate() {}
module.exports = { activate, deactivate }