Encodes the input string for safe output in the body of a HTML tag. The encoding in meant to mitigate Cross Site Scripting (XSS) attacks. This function can provide more protection from XSS than the HTMLEditFormat
or XMLFormat
functions do.
encodeForHTML(string [, canonicalize])
→ returns string
false
Pass in a tag and HTML encode the result.
encodeForHTML("<test>")
Expected Result: <test>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.