Java org.jsoup.safety Whitelist fields, constructors, methods, implement or subclass

Example usage for Java org.jsoup.safety Whitelist fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.jsoup.safety Whitelist.

The text is from its open source code.

Constructor

Whitelist()
Create a new, empty whitelist.

Method

WhitelistaddAttributes(String tag, String... attributes)
Add a list of allowed attributes to a tag.
WhitelistaddEnforcedAttribute(String tag, String attribute, String value)
Add an enforced attribute to a tag.
WhitelistaddProtocols(String tag, String attribute, String... protocols)
Add allowed URL protocols for an element's URL attribute.
WhitelistaddTags(String... tags)
Add a list of allowed elements to a whitelist.
Whitelistbasic()

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, span, strike, strong, sub, sup, u, ul, and appropriate attributes.

WhitelistbasicWithImages()
This whitelist allows the same text tags as #basic , and also allows img tags, with appropriate attributes, with src pointing to http or https.
Whitelistnone()
This whitelist allows only text nodes: all HTML will be stripped.
Whitelistrelaxed()
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 rel=nofollow attribute, but you can add that if desired.

WhitelistsimpleText()
This whitelist allows only simple text formatting: b, em, i, strong, u.