Escape HTML comment tags so that HTML comments are visible.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2023-04-24 21:29:49 +03:00
parent 22fc643f25
commit 167863d957

View file

@ -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('<!--', '&lt;!--').replace('-->', '--&gt;'), {ALLOW_UNKNOWN_PROTOCOLS: true}));
}));
}