HTMLEditFormat() - replace special character in a string with their HTML escaped equivalents
HTMLEditFormat.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HTMLEditFormat function example: how to replace special character in a string with their HTML escaped equivalents</title>
</head>
<body>
<h2 style="color:hotpink">HTMLEditFormat Function Example</h2>
<cfset MyString="<b>This is a bold text</b>
This is another line">
<cfoutput>
MyString: #MyString#
<br /><br /><br />
MyString[HTMLEditFormat]: #HTMLEditFormat(MyString,3.2)#
</cfoutput>
</body>
</html>
- Asc() - get the value of a character
- FindNoCase() - find the first occurence of a substring in a string (case insensitive)
- HTMLCodeFormat() - replace special character in a string with their HTML escaped equivalents
- LCase() - convert a string to lowercase
- ReplaceNoCase() - replace a substring in a string (case insensitive)
- Reverse() - reverse chracters in a string or digits in a number
- Right() - get the rightmost count characters in a string
- RTrim() - remove spaces from the end of a string
- UCase() - convert a string to uppercase