Articles in this section

htmlDecode helper

The htmlDecode helper converts HTML-encoded entities such as <, &, and " back to their readable characters. Use it when API responses or stored text contain encoded HTML and you need to process or display the plain form.

Syntax

{{{htmlDecode value}}}

value -- The HTML-encoded string to decode. Required.

Note: Always use triple braces ({{{ }}}). Double braces cause Celigo to re-encode the decoded output, reversing the effect of the helper.

Examples

Decode HTML entities in a field

{{{htmlDecode record.aiOutput}}}

Input:

{ "record": { "aiOutput": "<p>Hello & welcome</p>" } }

Output: <p>Hello & welcome</p>

Usage notes

  • Always use triple braces ({{{ }}}). Double braces re-encode the output.
  • Common entities decoded: &lt; → <, &gt; → >, &amp; → &, &quot; → ".
  • To decode and also strip HTML tags, leaving only plain text, combine with the sanitize helper.
  • To encode readable characters as HTML entities, use the htmlEncode helper instead.