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