ESAPIDecode

Decodes a string that has been encoded with ESAPIEncode.

ESAPIDecode( decodeFrom, 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 encode

Examples

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

See also