This class converts a String
to the HTML-format of a String.
To convert the String
, each character is examined:
-
ASCII-characters from 000 till 031 are represented as &#xxx;
(with xxx = the value of the character)
-
ASCII-characters from 032 t/m 127 are represented by the character itself, except for:
-
'
' becomes <BR>
-
" becomes "
-
& becomes &
-
< becomes <
-
> becomes >
-
ASCII-characters from 128 till 255 are represented as &#xxx;
(with xxx = the value of the character)
Example:
String htmlPresentation = HtmlEncoder.Encode("Marie-Thérèse Sørensen");
for more info: see O'Reilly; "HTML: The Definitive Guide" (page 164)
- Author
- mario.nosp@m..mac.nosp@m.carin.nosp@m.i@ru.nosp@m.g.ac..nosp@m.be