System.NetEncoding.THTMLEncoding
Delphi
THTMLEncoding = class(TNetEncoding)
C++
class PASCALIMPLEMENTATION THTMLEncoding : public TNetEncoding
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| class | public | System.NetEncoding.pas System.NetEncoding.hpp |
System.NetEncoding | System.NetEncoding |
Description
Provides methods to encode and decode data in HTML format.
THTMLEncoding only encodes reserved HTML characters: "&<>. THTMLEncoding supports decoding any HTML numeric character reference, such as &#169; or &#254;, as well as the character entity references of reserved HTML characters: &quot;, &amp;, &lt;, &gt;.
- Warning: Decoding character entity references of non-reserved characters, such as
&apos;or&copy;, is not supported. The input data must not contain any other character entity references. Otherwise, the output data may be corrupted.
THTMLEncoding provides the following methods:
| Encoding | Decoding | ||||
|---|---|---|---|---|---|
| Input | Method | Output | Input | Method | Output |
For example:
Encode('© "name & surname" <email>')returns'© "name & surname" <email>'.Decode('© "name & surname" <email>')returns'© "name & surname" <email>'.