htmlCodeFormat

Replaces special characters in a string with their HTML-escaped
equivalents and inserts <pre> and </pre> tags at the beginning
and end of the string.
[version]
HTML version to use. currently ignored.
-1: The latest implementation of HTML
2.0: HTML 2.0 (Default)
3.2: HTML 3.2

htmlCodeFormat(String [, version]) → returns string

htmlCodeFormat Argument Reference

String string
Required

version numeric

Values:
  • -1
  • 2
  • 3.2

Examples sample code invoking the htmlCodeFormat function

<cfset testString="This is a test & this is another <This text is in angle brackets> Previous line was blank!!!">   <cfoutput>#htmlCodeFormat(testString)#</cfoutput>   

Fork me on GitHub