Created
April 30, 2018 18:22
-
-
Save trycf/1a16002b9e5235b1f3cd1d2e79d0b3e3 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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