Skip to content

Commit

Permalink
Escape HTML comment tags so that HTML comments are visible.
Browse files Browse the repository at this point in the history
Thanks to xet7 !
  • Loading branch information
xet7 committed Apr 24, 2023
1 parent 22fc643 commit 167863d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/markdown/src/template-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}));
}));
}

0 comments on commit 167863d

Please sign in to comment.