2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-02 23:54:28 -06:00

Use .call() on the sanitize function

This commit is contained in:
adamb70 2020-02-04 18:21:54 +00:00
parent 9d2665b895
commit c83c593d58

View File

@ -1765,7 +1765,7 @@ EasyMDE.prototype.markdown = function (text) {
// Sanitize HTML // Sanitize HTML
if (this.options.renderingConfig && typeof this.options.renderingConfig.sanitizerFunction === 'function') { if (this.options.renderingConfig && typeof this.options.renderingConfig.sanitizerFunction === 'function') {
htmlText = this.options.renderingConfig.sanitizerFunction(htmlText); htmlText = this.options.renderingConfig.sanitizerFunction.call(this, htmlText);
} }
// Edit the HTML anchors to add 'target="_blank"' by default. // Edit the HTML anchors to add 'target="_blank"' by default.