Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/1a16002b9e5235b1f3cd1d2e79d0b3e3 to your computer and use it in GitHub Desktop.
Save trycf/1a16002b9e5235b1f3cd1d2e79d0b3e3 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
function xmlDecode(text){
return xmlParse("<t>#text#</t>").t.xmlText;
}
htmlString = "<html><head><title>Test Page</title></head></html>";
xmlEncoded = xmlFormat(htmlString);
decoded = xmlDecode(xmlEncoded);
writeDump({
htmlString: htmlString,
xmlEncoded: xmlEncoded,
decoded: decoded
});
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment