Package editor.util
Class HTMLEscapeUtil
java.lang.Object
editor.util.HTMLEscapeUtil
Static utilities for writing out HTML
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringEscape a string by replacing all occurrences of special characters (such as > and <) by their corresponding escapes.static Stringprivate static Stringstatic StringescapeAttribute(String string) Escape a string for use as an HTML attribute by replacing all double quotes and '&'.static StringescapeForTextArea(String string)
-
Field Details
-
NBSP
Constant representing non-breaking space escape character- See Also:
-
URL_PARAMETER_SEPARATOR
Character used to separate parameters in a URL query string- See Also:
-
-
Constructor Details
-
HTMLEscapeUtil
private HTMLEscapeUtil()
-
-
Method Details
-
escape
Escape a string by replacing all occurrences of special characters (such as > and <) by their corresponding escapes.- Parameters:
string- the string to be escaped- Returns:
- the escaped string or, if the original string does not contain any special characters, the original string.
-
escape
-
escapeForTextArea
-
escape
-
escapeAttribute
Escape a string for use as an HTML attribute by replacing all double quotes and '&'.
-