From c83c593d58dcf7c435b4567071b8dda3444eeb11 Mon Sep 17 00:00:00 2001 From: adamb70 Date: Tue, 4 Feb 2020 18:21:54 +0000 Subject: [PATCH] Use .call() on the sanitize function --- src/js/easymde.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/easymde.js b/src/js/easymde.js index 78aa594..5e4d8ce 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -1765,7 +1765,7 @@ EasyMDE.prototype.markdown = function (text) { // Sanitize HTML 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.