public class HTMLEscapeUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NBSP
Constant representing non-breaking space escape character
|
static String |
URL_PARAMETER_SEPARATOR
Character used to separate parameters in a URL query string
|
| Modifier and Type | Method and Description |
|---|---|
static String |
escape(String string)
Escape a string by replacing all occurrences of special characters (such
as > and <) by their corresponding escapes.
|
static String |
escape(String string,
boolean escapeNewLine) |
static String |
escapeAttribute(String string)
Escape a string for use as an HTML attribute by replacing all double
quotes and '&'.
|
static String |
escapeForTextArea(String string) |
public static final String NBSP
public static final String URL_PARAMETER_SEPARATOR
public static String escape(String string)
string - the string to be escapedCopyright © 2017. All rights reserved.