376
HTMLEditFormat
Returns HTML escaped string. All carriage returns are removed from string, and all
special characters (> < " &) are escaped.
See also HTMLCodeFormat.
Syntax
HTMLEditFormat( string [, version ])
string
String being HTML escaped.
version
The specific HTML version to use in replacing special characters with their entity
references. Valid entries are:
-1
2.0
3.2
Usage
By escaping all special characters, this function increases the length of the specified
string. This can cause unpredictable results when performing certain string functions
(Left, Right, and Mid, for example) against the expanded string.
Example
<!--- This example shows the use of HTMLCodeFormat
and HTMLEditFormat --->
<HTML>
<HEAD>
<TITLE>
HTMLEditFormat Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>HTMLEditFormat Example</H3>
<FORM ACTION="HTMLeditformat.cfm" METHOD="POST">
Try entering a URL for the tag to return in HTMLCodeFormat
and HTMLEditFormat:
<INPUT TYPE="Text" size=25 NAME="urladdress"
VALUE="http://www.allaire.com">
<INPUT TYPE="Submit" NAME="" VALUE="get page">
</FORM>
<!--- sets a default value for a url to retrieve --->
<CFPARAM NAME="urladdress" DEFAULT="http://localhost/cfdocs/index.htm">
<!--- if we have passed a url address in the FORM, we
want to display the passed address --->
– The latest implementation of HTML
– For HTML 2.0 (Default)
– For HTML 3.2
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers