We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2aadd3 commit 7fd65b6Copy full SHA for 7fd65b6
snippet.js
@@ -1,6 +1,6 @@
1
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE
2
var snippet = {
3
- version: "1.2",
+ version: "1.3",
4
5
// Writes out the given text in a monospaced paragraph tag, escaping
6
// & and < so they aren't rendered as HTML.
@@ -13,7 +13,7 @@ var snippet = {
13
} else if (typeof msg === "object") {
14
msg = msg === null ? "null" : JSON.stringify(msg);
15
}
16
- elm.innerHTML = msg.replace(/&/g, '&').replace(/</g, '<');
+ elm.appendChild(document.createTextNode(msg));
17
document.body.appendChild(elm);
18
},
19
0 commit comments