aboutsummaryrefslogtreecommitdiff
path: root/src/shell.html
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-06 10:34:19 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-03-06 10:34:19 -0800
commitac6876fb82b553ed6a5427b8b5abbe6ecb4ef34a (patch)
tree69b53e99462483ff619c8e3880fb3e22879fc12a /src/shell.html
parent89642b135f2a6852011b718ff5058ea8e032bc13 (diff)
escape & in html
Diffstat (limited to 'src/shell.html')
-rw-r--r--src/shell.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shell.html b/src/shell.html
index a41086b9..2f34ace3 100644
--- a/src/shell.html
+++ b/src/shell.html
@@ -19,6 +19,7 @@
print: (function() {
var element = document.getElementById('output');
return function(text) {
+ text = text.replace(/&/g, "&amp;");
text = text.replace(/</g, "&lt;");
text = text.replace(/>/g, "&gt;");
text = text.replace('\n', '<br>', 'g');