[Text and HTML Processing] Sanitize unescaped HTML

Forge Component
(5)
Published on 2018-11-15 by leonardo.fernandes
5 votes
Published on 2018-11-15 by leonardo.fernandes

Hi Leonardo,

I am displaying HTML from database and trying to sanitize it against malicious tags. I thought "Text and HTML Processing" was designed to handle that, but HtmlRemoveUnsafeTags is not exposed as a function. Is this functionality supported and if so how do I use it?

Thank you,
Michael


Michael Portnoy wrote:

Hi Leonardo,

I am displaying HTML from database and trying to sanitize it against malicious tags. I thought "Text and HTML Processing" was designed to handle that, but HtmlRemoveUnsafeTags is not exposed as a function. Is this functionality supported and if so how do I use it?

Thank you,
Michael


Hello Michael,

You can use the Outsystems API to do that:

https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/Sanitization_API#SanitizeHtml