diff options
author | Wu Cheng-Han | 2016-10-19 22:09:15 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-10-19 22:09:15 +0800 |
commit | 866c10d9428c0a23b92ccab441c113a33d463962 (patch) | |
tree | 5b29f24119bb61631152688a020ba8b185d72278 /public | |
parent | f346e179edb44e4c4434fee8657ffb126a8105ec (diff) |
Update to make pretty use same method as slide to unescape markdown content
Diffstat (limited to 'public')
-rw-r--r-- | public/js/pretty.js | 5 |
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); |