Removes all markup tags from the input string and returns only the plain text content. This is useful when working with values that may include formatting or markup but need to be stored, displayed, or passed along as clean text.
-
Strip markup from a field value
{{sanitize record.raw}}Input:
{ "record": { "raw": "<span>Hello <strong>World</strong></span>" } }Output:
Hello World
Tip
-
Use this helper when cleaning fields that may contain markup copied from external sources, such as CMS fields or web form inputs.
-
Only tags are removed; the text content inside the tags is preserved.
-
Pair with formatting helpers if you need to reformat the sanitized string after cleanup.
-
No spaces/newlines are added for removed elements (div, li, td, br, etc.).
-
Self closing/void elements like <img> are removed; surrounding text is retained.
-
If HTML entities are preserved after sanitizing, use htmlDecode to convert these into their readable characters.