diff options
Diffstat (limited to 'public/js/pretty.js')
-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); |