From f52bcffbfc8be533d6dd0173b0c30e4855932f46 Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Tue, 3 Nov 2015 19:00:20 -0500 Subject: escape HTML entities in source viewer --- assets/js/custom.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'assets/js') 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(); -- cgit v1.2.3