public class StringEscapeUtils
extends java.lang.Object
Constructor and Description |
---|
StringEscapeUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeAngleBrackets(java.lang.String html) |
static java.lang.String |
escapeHTML(java.lang.String html)
Escapes all the HTML tags in a given string
|
static java.lang.String |
escapeXml(java.lang.String text) |
static java.lang.String |
unescapeAngleBrackets(java.lang.String text) |
static java.lang.String |
unescapeHTML(java.lang.String text)
Unescapes any HTML within the given string, i.e <Html> = <Html>
|
static java.lang.String |
unescapeXml(java.lang.String text) |
public static java.lang.String escapeHTML(java.lang.String html)
html
- A string containg the HTML to be encodedpublic static java.lang.String escapeAngleBrackets(java.lang.String html)
public static java.lang.String unescapeAngleBrackets(java.lang.String text)
public static java.lang.String unescapeHTML(java.lang.String text)
text
- The text containing the escaped HTMLpublic static java.lang.String escapeXml(java.lang.String text)
public static java.lang.String unescapeXml(java.lang.String text)