ESAPIDecode()

Decodes a string that has been encoded with ESAPIEncode.

Requires Extension: ESAPI extension

ESAPIDecode( decodeFrom=string, string=string );

Returns: String

Argument Description
decodeFrom
string, required

given value is encoded as:

  • url: also decodes html-encoded content in Lucee 4
  • html (not in Lucee 4)
string
string, required

string to decode

Examples

enc=ESAPIDecode("html","<table>");//html
	writeDump(enc);//<table>
	enc=encodeForURL('https://download.lucee.org/?type=releases');//URL
	writeDump(enc);
	dec=ESAPIdecode('url','http%3A%2F%2Fdownload.lucee.org%2F%3Ftype%3Dreleases');
	writeDump(dec);//https://download.lucee.org/?type=releases

See also