Reference > Expressions > Built-in Functions > System Functions > HtmlSanitize

HtmlSanitize

Returns the text portion of the HTML content that was passed in. This removes any embedded code, such as JavaScript, or other content that would slow down browser response. "Alt" information is passed, and images are included as attachments.

Some characters in HTML have special meaning and the browser does not render them literally.  For example, the browser interprets any text enclosed by angle brackets (< and >) as an HTML tag that describes the formatting of the text. To display HTML code literally, including all of the syntax, it must be HTML encoded when sent to the browser.  The system replaces certain characters that have special meaning in HTML with other characters.  For example, the system replaces a greater than sign (>) with &gt;, replaces the less than sign (<) with &lt;, and replaces the ampersand sign (&) with &amp;.

Syntax

HtmlSanitize(text)

Enabled for

Search/Dashboard No
Business Rules Yes
Quick Actions Yes
Workflow Objects Yes
Reports No

Parameters

text The text to sanitize.

Return Value

Unicode text value.

Example