Encodes a string for safe output within an XML attribute to prevent Cross Site Scripting attacks. Use encodeForXML when outputting a variable inside a XML tag body.
encodeForXMLAttribute(string [,canonicalize]);
→ returns string
false
Encodes the single quote into an XML entity.
encodeForXMLAttribute("It's for use in attribute values")
Expected Result: It's for use in attribute values
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.