How to use the ESCAPEHTML operation for Computed Attributes
Definition
The ESCAPEHTML operation removes all HTML tags from a text.
Example
ESCAPEHTML(“<script>alert(‘Hello’)</script><b>Hello World</b>”)
Result:
Hello World
Syntax Guide
ESCAPEHTML(text)
text - The text string to remove HTML tags from
Formulas In Use
Stripping HTML With Line Breaks
In order to remove all the HTML code from a Rich text but still maintain the text in different lines as a paragraph.
Transforming this: “<ul><li>This</li><li>That</li><li>The other<br></li></ul>”
Into this:
“This
That
The other”
Formula:
ESCAPEHTML(SUBSTITUTE($ATT.RICH_TEXT,"<li>", "
"))
Stripping HTML With Line Breaks and Keeping Bullet Points
Maintain bullet points in the plain text version by adding the symbol in the bullet point symbol:
ESCAPEHTML(SUBSTITUTE($ATT.RICH_TEXT,"<li>", "
•"))