Package org.owasp.validator.html.scan
Class AntiSamyDOMScanner
java.lang.Object
org.owasp.validator.html.scan.AbstractAntiSamyScanner
org.owasp.validator.html.scan.AntiSamyDOMScanner
This is where the magic lives. All the scanning/filtration logic resides
here, but it should not be called directly. All scanning should be done
through a
AntiSamy.scan()
method.- Author:
- Arshan Dabirsiaghi
-
Field Summary
Fields inherited from class org.owasp.validator.html.scan.AbstractAntiSamyScanner
errorMessages, isNofollowAnchors, isValidateParamAsEmbed, locale, messages, policy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
This is where the magic lives.Methods inherited from class org.owasp.validator.html.scan.AbstractAntiSamyScanner
addError, getHTMLSerializer, getOutputFormat, trim
-
Constructor Details
-
AntiSamyDOMScanner
-
AntiSamyDOMScanner
- Throws:
PolicyException
-
-
Method Details
-
scan
This is where the magic lives.- Specified by:
scan
in classAbstractAntiSamyScanner
- Parameters:
html
- A String whose contents we want to scan.- Returns:
- A
CleanResults
object with anXMLDocumentFragment
object and its String representation, as well as some scan statistics. - Throws:
ScanException
-
main
- Throws:
PolicyException
-
getResults
- Specified by:
getResults
in classAbstractAntiSamyScanner
-