EncodeForHTML()
Encodes the given string for safe output in HTML to stop Cross Site Scripting attacks.
Requires Extension: ESAPI extension
EncodeForHTML( string=string, canonicalize=boolean );
Returns: String
Examples
Simple Example
writedump(encodeForHTML('<img src="">'));
See also
- Encode/Decode
- HTML
- ESAPIEncode()
- HTMLCodeFormat()
- HTMLEditFormat()
- string.encodeForHTML()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)