mirror of https://github.com/status-im/codimd.git
Update to make pretty use same method as slide to unescape markdown content
This commit is contained in:
parent
f346e179ed
commit
866c10d942
|
@ -1,3 +1,6 @@
|
||||||
|
/* other vendors plugin */
|
||||||
|
var S = require('string');
|
||||||
|
|
||||||
var extra = require('./extra');
|
var extra = require('./extra');
|
||||||
var md = extra.md;
|
var md = extra.md;
|
||||||
var finishView = extra.finishView;
|
var finishView = extra.finishView;
|
||||||
|
@ -12,7 +15,7 @@ var parseMeta = extra.parseMeta;
|
||||||
var preventXSS = require('./render').preventXSS;
|
var preventXSS = require('./render').preventXSS;
|
||||||
|
|
||||||
var markdown = $("#doc.markdown-body");
|
var markdown = $("#doc.markdown-body");
|
||||||
var text = $('<textarea/>').html(markdown.html()).text();
|
var text = S(markdown.html()).unescapeHTML().s;
|
||||||
var lastMeta = md.meta;
|
var lastMeta = md.meta;
|
||||||
md.meta = {};
|
md.meta = {};
|
||||||
var rendered = md.render(text);
|
var rendered = md.render(text);
|
||||||
|
|
Loading…
Reference in New Issue