All Packages Class Hierarchy This Package Previous Next Index
Class nl.nmg.servlet.HTMLEncoder
java.lang.Object
|
+----nl.nmg.servlet.HTMLEncoder
- public class HTMLEncoder
- extends Object
The HTMLEncoder class contains a utility method for converting
a string into a format suitable for placing inside a HTML tag
parameter, sometimes known as "html encoding".
To convert a String
, each character is examined
in turn:
- < is converted into <
- > is converted into >
- & is converted into &
- " is converted into "
- ' is converted into '
- All other characters remain the same.
-
encode(String)
- Converts a string into a htmlencoded string.
encode
public static String encode(String val)
- Converts a string into a htmlencoded string.
- Parameters:
- val - the
String
to be converted.
- Returns:
- the converted
String
.
All Packages Class Hierarchy This Package Previous Next Index