XmlFormat()
Escapes special XML characters in a string, so that the string is safe to use with XML.
EncodeForXML() is the updated version of this function, which uses ESAPI and escapes a wider range of content.
XmlFormat( string=string );
Returns: String
| Argument | Description |
|---|---|
|
string
string,
required
|
edit
A string or a variable that contains one |
Examples
editstring = "I like peanut butter & jelly.";
dump(XmlFormat(string)); // I like peanut butter & jelly.
See also
- Formatting
- Strings
- XML
- EncodeForXML()
- EncodeForXMLAttribute()
- EncodeForXPath()
- WriteOutput()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)