From 167863d95711249e69bb3511175d73b34acbbdb3 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 24 Apr 2023 21:29:49 +0300 Subject: [PATCH] Escape HTML comment tags so that HTML comments are visible. Thanks to xet7 ! --- packages/markdown/src/template-integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/markdown/src/template-integration.js b/packages/markdown/src/template-integration.js index e3d2c6a44..f697d177e 100644 --- a/packages/markdown/src/template-integration.js +++ b/packages/markdown/src/template-integration.js @@ -65,6 +65,6 @@ if (Package.ui) { text = Blaze._toText(self.templateContentBlock, HTML.TEXTMODE.STRING); } - return HTML.Raw(DOMPurify.sanitize(Markdown.render(text), {ALLOW_UNKNOWN_PROTOCOLS: true})); + return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('', '-->'), {ALLOW_UNKNOWN_PROTOCOLS: true})); })); }