HTMLEditFormat()
Replaces special characters in a string with their HTML-escaped equivalents. [version] HTML version to use is currently ignored.
-1: The latest implementation of HTML
2.0: HTML 2.0 (Default)
3.2: HTML 3.2
4.0: HTML 4.0
HTMLEditFormat( string=string, version=number );
Returns: String
| Argument | Description |
|---|---|
|
string
string,
required
|
edit
A string or a variable that contains one. |
|
version
number,
optional
|
edit
HTML version to use: -1: The latest implementation of HTML 2.0: HTML 2.0 (default) 3.2: HTML 3.2 |
Examples
edittestString="Hello !!!
<This text is inside of angle brackets>
This text is outside of angle brackets !!!" ;
writeoutput(testString);
writeoutput('<h5>HTMLEditFormat</h5>' & HTMLEditFormat(testString));
See also
- Formatting
- HTML
- Strings
- Encode/Decode
- EncodeForHTML()
- ESAPIEncode()
- HTMLCodeFormat()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)