Skip to content

Commit 167863d

Browse files
committed
Escape HTML comment tags so that HTML comments are visible.
Thanks to xet7 !
1 parent 22fc643 commit 167863d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/markdown/src/template-integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ if (Package.ui) {
6565
text = Blaze._toText(self.templateContentBlock, HTML.TEXTMODE.STRING);
6666
}
6767

68-
return HTML.Raw(DOMPurify.sanitize(Markdown.render(text), {ALLOW_UNKNOWN_PROTOCOLS: true}));
68+
return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('<!--', '&lt;!--').replace('-->', '--&gt;'), {ALLOW_UNKNOWN_PROTOCOLS: true}));
6969
}));
7070
}

0 commit comments

Comments
 (0)