Uses of Class
com.itextpdf.styledxmlparser.jsoup.safety.Safelist
Packages that use Safelist
-
Uses of Safelist in com.itextpdf.styledxmlparser.jsoup
Methods in com.itextpdf.styledxmlparser.jsoup with parameters of type SafelistModifier and TypeMethodDescriptionstatic StringGet safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a safe-list of permitted tags and attributes.static StringGet safe HTML from untrusted input HTML, by parsing input HTML and filtering it through an allow-list of safe tags and attributes.static StringJsoup.clean(String bodyHtml, String baseUri, Safelist safelist, Document.OutputSettings outputSettings) Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a safe-list of permitted tags and attributes.static booleanTest if the input body HTML has only tags and attributes allowed by the Safelist. -
Uses of Safelist in com.itextpdf.styledxmlparser.jsoup.safety
Subclasses of Safelist in com.itextpdf.styledxmlparser.jsoup.safetyFields in com.itextpdf.styledxmlparser.jsoup.safety declared as SafelistMethods in com.itextpdf.styledxmlparser.jsoup.safety that return SafelistModifier and TypeMethodDescriptionSafelist.addAttributes(String tag, String... attributes) Add a list of allowed attributes to a tag.Whitelist.addAttributes(String tag, String... attributes) Deprecated.Safelist.addEnforcedAttribute(String tag, String attribute, String value) Add an enforced attribute to a tag.Whitelist.addEnforcedAttribute(String tag, String attribute, String value) Deprecated.Safelist.addProtocols(String tag, String attribute, String... protocols) Add allowed URL protocols for an element's URL attribute.Whitelist.addProtocols(String tag, String attribute, String... protocols) Deprecated.Add a list of allowed elements to a safelist.Deprecated.static SafelistSafelist.basic()This safelist 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.static SafelistSafelist.basicWithImages()This safelist allows the same text tags asSafelist.basic(), and also allowsimgtags, with appropriate attributes, withsrcpointing tohttporhttps.static SafelistSafelist.none()This safelist allows only text nodes: all HTML will be stripped.Safelist.preserveRelativeLinks(boolean preserve) Configure this Safelist to preserve relative links in an element's URL attribute, or convert them to absolute links.Whitelist.preserveRelativeLinks(boolean preserve) Deprecated.static SafelistSafelist.relaxed()This safelist 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, ulSafelist.removeAttributes(String tag, String... attributes) Remove a list of allowed attributes from a tag.Whitelist.removeAttributes(String tag, String... attributes) Deprecated.Safelist.removeEnforcedAttribute(String tag, String attribute) Remove a previously configured enforced attribute from a tag.Whitelist.removeEnforcedAttribute(String tag, String attribute) Deprecated.Safelist.removeProtocols(String tag, String attribute, String... removeProtocols) Remove allowed URL protocols for an element's URL attribute.Whitelist.removeProtocols(String tag, String attribute, String... removeProtocols) Deprecated.Safelist.removeTags(String... tags) Remove a list of allowed elements from a safelist.Whitelist.removeTags(String... tags) Deprecated.static SafelistSafelist.simpleText()This safelist allows only simple text formatting:b, em, i, strong, u.Constructors in com.itextpdf.styledxmlparser.jsoup.safety with parameters of type Safelist
v1.14.1, this class is deprecated in favour ofSafelist.