decodeHtml
Ensures Studio interprets the input string as HTML.
Studio assumes that all text typed into the script editor (or extracted from the data) should be printed verbatim. Therefore, it encodes special characters such as < and > as HTML entities (e.g. < or >) to ensure the browser interprets them as text, not HTML.
If you want Studio to interpret text as HMTL, apply decodeHtml
to reverse the encoding.
Parameters
STRING (string)
The string to interpret as HTML.
Examples
ATL in Script | Preview Result | Result in API Output |
---|---|---|
| <b>recent</b> | <b>recent</b> |
| recent | <b>recent</b> |
| <i>recent</i> | <i>recent</i> |
| recent | <i>recent</i> |
The Preview Result column shows the output in Studio's Preview Mode.
The Result in API Output column shows the result when the API output format is HTML (the default). For more about the output format, see contentOutputFormat
in Using a Studio app's API > Request body options.
Note
You can use the function to create HTML tables. See HTML tables for guidance.