From 67786a8aab2c2d0265144cb960540c629d2465f3 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sun, 23 Oct 2016 16:30:09 +0800 Subject: [PATCH] Fix code block syntax highlighting might not process properly because the HTML is escaped --- public/js/extra.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/extra.js b/public/js/extra.js index bc6092db..1dd1d556 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -476,10 +476,10 @@ function finishView(view) { var code = ""; if (codeDiv.length > 0) code = codeDiv.html(); else code = langDiv.html(); - code = md.utils.unescapeAll(code); + code = S(code).unescapeHTML().s; if (!reallang) { var result = { - value: md.utils.escapeHtml(code) + value: S(code).escapeHTML().s }; } else if (reallang == "tiddlywiki" || reallang == "mediawiki") { var result = {