summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-19 22:09:15 +0800
committerWu Cheng-Han2016-10-19 22:09:15 +0800
commit866c10d9428c0a23b92ccab441c113a33d463962 (patch)
tree5b29f24119bb61631152688a020ba8b185d72278 /public
parentf346e179edb44e4c4434fee8657ffb126a8105ec (diff)
Update to make pretty use same method as slide to unescape markdown content
Diffstat (limited to 'public')
-rw-r--r--public/js/pretty.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/js/pretty.js b/public/js/pretty.js
index c5211202..59403586 100644
--- a/public/js/pretty.js
+++ b/public/js/pretty.js
@@ -1,3 +1,6 @@
+/* other vendors plugin */
+var S = require('string');
+
var extra = require('./extra');
var md = extra.md;
var finishView = extra.finishView;
@@ -12,7 +15,7 @@ var parseMeta = extra.parseMeta;
var preventXSS = require('./render').preventXSS;
var markdown = $("#doc.markdown-body");
-var text = $('<textarea/>').html(markdown.html()).text();
+var text = S(markdown.html()).unescapeHTML().s;
var lastMeta = md.meta;
md.meta = {};
var rendered = md.render(text);