HTMLCodeFormat

Replaces special characters in a string with their HTML-escaped
equivalents and inserts

 and 
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

Argument Reference for the HTMLCodeFormat function

String

Required: Yes

version

Required: No
Values:
  • -1
  • 2
  • 3.2

Examples sample code invoking the HTMLCodeFormat function


Tag Syntax

<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