HTML
public class RichText
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BLOCK_NODE_FOR_ENTER
Deprecated.
|
static java.lang.String |
RICH_TEXT_MARKER
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
cleanHtml(java.lang.String html,
boolean escapeForJavascript,
boolean escapeForHtmlAttribute,
boolean escapeCDATA)
Deprecated.
|
static java.lang.String |
cleanText(java.lang.String text,
boolean escapeForJavascript)
Deprecated.
|
static java.lang.String |
cleanValue(java.lang.String value,
boolean escapeForJavascript,
boolean escapeForHtmlAttrib)
Deprecated.
|
static java.lang.String |
cleanValue(java.lang.String value,
boolean escapeForJavascript,
boolean escapeForHtmlAttrib,
boolean escapeCDATA)
Deprecated.
|
static boolean |
isHtml(java.lang.String value)
Deprecated.
|
static java.lang.String |
toPlainText(java.lang.String html,
boolean escapeForHtmlAttribute)
Deprecated.
|
public static final java.lang.String BLOCK_NODE_FOR_ENTER
HTML.BLOCK_NODE_FOR_ENTER
public static final java.lang.String RICH_TEXT_MARKER
HTML.RICH_TEXT_MARKER
public static java.lang.String cleanValue(java.lang.String value, boolean escapeForJavascript, boolean escapeForHtmlAttrib)
HTML.cleanValue(String, boolean, boolean)
public static java.lang.String cleanValue(java.lang.String value, boolean escapeForJavascript, boolean escapeForHtmlAttrib, boolean escapeCDATA)
HTML.cleanValue(String, boolean, boolean, boolean)
escapeForJavascript
- true to escape special so the string can be used in javascriptescapeForHtmlAttrib
- true to encode special characters as character or entity references so the string can be used in an html attributeescapeCDATA
- true to escape CDATA blocks so that the value can be placed in a CDATA blockpublic static boolean isHtml(java.lang.String value)
HTML.isHtml(String)
value
- the string to evaluatepublic static java.lang.String toPlainText(java.lang.String html, boolean escapeForHtmlAttribute)
HTML.toPlainText(String, boolean)
public static java.lang.String cleanText(java.lang.String text, boolean escapeForJavascript)
HTML.cleanText(String, boolean)
text
- the text to be cleaned upescapeForJavascript
- True if newlines and quotes should be escaped so the resultant string can be used
as-is in a javascript string.public static java.lang.String cleanHtml(java.lang.String html, boolean escapeForJavascript, boolean escapeForHtmlAttribute, boolean escapeCDATA)
HTML.cleanHtml(String, boolean, boolean, boolean)
html
- the original html string