Indy 9 | Content | Index | Reference

StrHtmlEncode
See Also, Unit: IdStrings
Converts a string containing reserved HTML characters to a string using HTML Entity references.

    function StrHtmlEncode(const AStr: String): String;

Unit
IdStrings
Parameters
const AStr: String
Values to be converted to their representation as an HTML Entity reference.
Return Value
String - String containing HTML Entity references.
Description
StrHtmlEncode is a String function that converts the string AStr containing reserved HTML characters to a string using HTML Entity references. StrHtmlEncode will convert the following reserved HTML characters to the following representations:

- & - &amp;

- < - &lt;

- > - &gt;

- " - &quot;

- ' - &apos;

Use StrHTMLDecode to convert a string containing HTML Entity references to its string representation.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.