Pagedown: Use default sanitizer for preview
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
renderPagedown = function() {
|
renderPagedown = function() {
|
||||||
$(".wmd-output").each(function (i) {
|
$(".wmd-output").each(function (i) {
|
||||||
const converter = new Markdown.Converter();
|
const converter = Markdown.getSanitizingConverter();
|
||||||
const content = $(this).html();
|
const content = $(this).html();
|
||||||
return $(this).html(converter.makeHtml(content));
|
return $(this).html(converter.makeHtml(content));
|
||||||
})
|
})
|
||||||
@ -20,7 +20,7 @@ createPagedownEditor = function( selector, context ) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const attr = $(input).attr('id').split('wmd-input')[1];
|
const attr = $(input).attr('id').split('wmd-input')[1];
|
||||||
const converter = new Markdown.Converter();
|
const converter = Markdown.getSanitizingConverter();
|
||||||
Markdown.Extra.init(converter);
|
Markdown.Extra.init(converter);
|
||||||
const help = {
|
const help = {
|
||||||
handler() {
|
handler() {
|
||||||
|
Reference in New Issue
Block a user