|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<SafeHtml.WhiteListType> org.hibernate.validator.constraints.SafeHtml.WhiteListType
public static enum SafeHtml.WhiteListType
Defines default whitelist implementations
Enum Constant Summary | |
---|---|
BASIC
This whitelist allows a fuller range of text nodes: a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, strike, strong, sub, sup, u, ul
, and appropriate attributes. |
|
BASIC_WITH_IMAGES
This whitelist allows the same text tags as BASIC , and also allows img
tags,
with
appropriate attributes, with src pointing to http or https . |
|
NONE
This whitelist allows only text nodes: all HTML will be stripped. |
|
RELAXED
This whitelist allows a full range of text and structural body HTML: a, b, blockquote, br, caption, cite, code, col, colgroup, dd, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li,
ol, p, pre, q, small, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul
Links do not have an enforced rel=nofollow attribute, but you can add that if desired. |
|
SIMPLE_TEXT
This whitelist allows only simple text formatting: b, em, i, strong, u . |
Method Summary | |
---|---|
static SafeHtml.WhiteListType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SafeHtml.WhiteListType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SafeHtml.WhiteListType NONE
public static final SafeHtml.WhiteListType SIMPLE_TEXT
b, em, i, strong, u
. All other HTML (tags and
attributes) will be removed.
public static final SafeHtml.WhiteListType BASIC
a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, strike, strong, sub, sup, u, ul
, and appropriate attributes.
Links (a
elements) can point to http, https, ftp, mailto
, and have an enforced
rel=nofollow
attribute.
Does not allow images.
public static final SafeHtml.WhiteListType BASIC_WITH_IMAGES
BASIC
, and also allows img
tags,
with
appropriate attributes, with src
pointing to http
or https
.
public static final SafeHtml.WhiteListType RELAXED
a, b, blockquote, br, caption, cite, code, col, colgroup, dd, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li,
ol, p, pre, q, small, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul
Links do not have an enforced rel=nofollow
attribute, but you can add that if desired.
Method Detail |
---|
public static SafeHtml.WhiteListType[] values()
for (SafeHtml.WhiteListType c : SafeHtml.WhiteListType.values()) System.out.println(c);
public static SafeHtml.WhiteListType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |