HTML Decode
HTML Decode
Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.
Parameters:
- value String
The string to decode.
Returns
A decoded string.
Remarks:
Blanks and punctuation may be misunderstood at the receiving end if they are passed in an HTTP stream. HTML encoding transforms forbidden HTML characters into character-entity counterparts; HTML decoding reverses the encoding. When inserted in a block of text, for example, the characters and > are encoded as and > for HTTP transmission.
If the value parameter is null, the decoded string returned is also null. If the value parameter is an empty string, the decoded string that is returned is also an empty string.
HtmlDecode(String, TextWriter):
Converts a string that has been HTML-encoded into a decoded string, and sends the decoded string to a TextWriter output stream.
Parameters;
- value String
The string to decode.
- output TextWriter
A TextWriter stream of output.
Exceptions
The output
the parameter cannot be null
if the value
parameter is not null
.
Remarks:
Blanks and punctuation may be misunderstood at the receiving end if they are passed in an HTTP stream. HTML encoding transforms forbidden HTML characters into character-entity counterparts; HTML decoding reverses the encoding. When inserted in a block of text, for example, the characters and > are encoded as and > for HTTP transmission.