mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Found and fixed more InvisibleBleed of WeKan.
Thanks to xet7 !
This commit is contained in:
parent
46c29a0b97
commit
4c016169c5
1 changed files with 5 additions and 2 deletions
|
@ -64,7 +64,10 @@ if (Package.ui) {
|
|||
if (self.templateContentBlock) {
|
||||
text = Blaze._toText(self.templateContentBlock, HTML.TEXTMODE.STRING);
|
||||
}
|
||||
|
||||
return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('<!--', '<!--').replace('-->', '-->'), {ALLOW_UNKNOWN_PROTOCOLS: true}));
|
||||
if (text.includes("[]") !== false || text.includes("<!--") !== false || text.includes("-->") !== false) {
|
||||
return HTML.Raw('<h2 style="color: red; background-color: yellow;">WARNING! HIDDEN TEXT!</h2><pre style="background-color: red;">' + DOMPurify.sanitize(text.replace('<!--', '<!--').replace('-->', '-->').replace('<pre>', '').replace('</pre>','') + '</pre>'));
|
||||
} else {
|
||||
return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('<!--', '<!--').replace('-->', '-->'), {ALLOW_UNKNOWN_PROTOCOLS: true}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue