HTML Decode
Table of Contents
Description
The htmlDecode function is used to render all the HTML entities in the input string to HTML. To perform reverse operation, i.e., encode a HTML text to HTML entities, use htmlEncode function.
Note:
- The size of the supplied input text and the returned output text can individually be up to 300KB.
- This function supports until the HTML 4 version.
Syntax
<response> = <data>.htmlDecode();
<response> = htmlDecode(<data>);
where:
Params | Data type | Description |
<response> | TEXT | Specifies the response that represents the decoded HTML data |
<data> | TEXT | Specifies the input HTML text whose special HTML characters are encoded that will be decoded |
Example 1: Decode a text with HTML entities to HTML
The following script decodes the input text such that all the HTML entities will be transformed into respective HTML characters.
response = htmlDecode("Your order is ready<br />Thank you.");
where:
response
The TEXT response that represents the decoded data. This example returns - Your order is ready<br />Thank you.
"Your order is ready<br />Thank you."
The TEXT that represents the input with HTML entities that will be decoded