Example usage for Java org.jsoup.safety Whitelist fields, constructors, methods, implement or subclass
The text is from its open source code.
Whitelist() Create a new, empty whitelist. |
Whitelist | addAttributes(String tag, String... attributes) Add a list of allowed attributes to a tag. |
Whitelist | addEnforcedAttribute(String tag, String attribute, String value) Add an enforced attribute to a tag. |
Whitelist | addProtocols(String tag, String attribute, String... protocols) Add allowed URL protocols for an element's URL attribute. |
Whitelist | addTags(String... tags) Add a list of allowed elements to a whitelist. |
Whitelist | basic() This whitelist allows a fuller range of text nodes: |
Whitelist | basicWithImages() This whitelist allows the same text tags as #basic , and also allows img tags, with appropriate attributes, with src pointing to http or https . |
Whitelist | none() This whitelist allows only text nodes: all HTML will be stripped. |
Whitelist | relaxed() This whitelist allows a full range of text and structural body HTML: a, b, blockquote, br, caption, cite, code, col, colgroup, dd, div, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li, ol, p, pre, q, small, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul Links do not have an enforced |
Whitelist | simpleText() This whitelist allows only simple text formatting: b, em, i, strong, u . |