diff options
author | Thomas Park <thomas@thomaspark.co> | 2015-11-03 19:00:20 -0500 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.co> | 2015-11-03 19:00:20 -0500 |
commit | f52bcffbfc8be533d6dd0173b0c30e4855932f46 (patch) | |
tree | d7ba2f32b751d81813036f3b3882ae3db37a7cd5 | |
parent | 2606e1460c4b9b9e1bb585381f906b98aa941d2b (diff) |
escape HTML entities in source viewer
-rw-r--r-- | assets/js/custom.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/assets/js/custom.js b/assets/js/custom.js index 5a9a6a55..d270087b 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -32,6 +32,12 @@ }); function cleanSource(html) { + html = html.replace(/×/g, "&close;") + .replace(/«/g, "«") + .replace(/»/g, "»") + .replace(/←/g, "←") + .replace(/→/g, "→"); + var lines = html.split(/\n/); lines.shift(); |