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.
- 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.
<response> = <data>.htmlDecode();
<response> = htmlDecode(<data>);
Specifies the response that represents the decoded HTML data
Specifies the input HTML text whose special HTML characters are encoded that will be decoded
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.");
"Your order is ready<br />Thank you."