public class Cleaner extends Object
clean methods in Zsoup.| Constructor and Description |
|---|
Cleaner(Whitelist whitelist)
Create a new cleaner, that sanitizes documents using the supplied whitelist.
|
| Modifier and Type | Method and Description |
|---|---|
Document |
clean(Document dirtyDocument)
Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist.
|
boolean |
isValid(Document dirtyDocument)
Determines if the input document is valid, against the whitelist.
|
public Cleaner(Whitelist whitelist)
whitelist - white-list to clean withpublic Document clean(Document dirtyDocument)
body are used.dirtyDocument - Untrusted base document to clean.public boolean isValid(Document dirtyDocument)
clean(Document) document. If using as a validator, it is recommended to still clean the document
to ensure enforced attributes are set correctly, and that the output is tidied.dirtyDocument - document to testCopyright © 2009-2015 Potix. All Rights Reserved.