diff --git a/packages/markdown/src/template-integration.js b/packages/markdown/src/template-integration.js index 095006426..8f5a6c335 100644 --- a/packages/markdown/src/template-integration.js +++ b/packages/markdown/src/template-integration.js @@ -64,10 +64,16 @@ if (Package.ui) { if (self.templateContentBlock) { text = Blaze._toText(self.templateContentBlock, HTML.TEXTMODE.STRING); } - if (text.includes("[]") !== false || text.includes("") !== false) { - return HTML.Raw('

WARNING! HIDDEN TEXT!

' + DOMPurify.sanitize(text.replace('', '-->').replace('
', '').replace('
','') + '
')); + if (text.includes("[]") !== false) { + // Prevent hiding info: https://wekan.github.io/hall-of-fame/invisiblebleed/ + // If markdown link does not have description, do not render markdown, instead show all of markdown source code using preformatted text. + // Also show html comments. + return HTML.Raw('
' + DOMPurify.sanitize(text.replace('', '-->')) + '
'); } else { - return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('', '-->'), {ALLOW_UNKNOWN_PROTOCOLS: true})); + // Prevent hiding info: https://wekan.github.io/hall-of-fame/invisiblebleed/ + // If text does not have hidden markdown link, render all markdown. + // Also show html comments. + return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('', '-->'), {ALLOW_UNKNOWN_PROTOCOLS: true})); } })); }