public class AntiSamy extends Object
scan() method holds the meat and potatoes of AntiSamy. The file
contains a number of ways for scan()'ing depending on the
accessibility of the policy file.| Modifier and Type | Method and Description |
|---|---|
CleanResults |
scan(String taintedHTML)
The meat and potatoes.
|
CleanResults |
scan(String taintedHTML,
File policyFile)
This method wraps
scan() using the policy File object passed
in. |
CleanResults |
scan(String taintedHTML,
int scanType) |
CleanResults |
scan(String taintedHTML,
Policy policy)
This method wraps
scan() using the Policy object passed in. |
CleanResults |
scan(String taintedHTML,
Policy policy,
int scanType) |
CleanResults |
scan(String taintedHTML,
String filename)
This method wraps
scan() using the Policy object passed in. |
public AntiSamy()
public AntiSamy(Policy policy)
public CleanResults scan(String taintedHTML) throws ScanException, PolicyException
scan() family of methods are the
only methods the outside world should be calling to invoke AntiSamy.taintedHTML - Untrusted HTML which may contain malicious code.CleanResults object which contains information
about the scan (including the results).ScanException - When there is a problem encountered
while scanning the HTML.PolicyException - When there is a problem reading the
policy file.public CleanResults scan(String taintedHTML, int scanType) throws ScanException, PolicyException
ScanExceptionPolicyExceptionpublic CleanResults scan(String taintedHTML, Policy policy) throws ScanException, PolicyException
scan() using the Policy object passed in.ScanExceptionPolicyExceptionpublic CleanResults scan(String taintedHTML, Policy policy, int scanType) throws ScanException, PolicyException
ScanExceptionPolicyExceptionpublic CleanResults scan(String taintedHTML, String filename) throws ScanException, PolicyException
scan() using the Policy object passed in.ScanExceptionPolicyExceptionpublic CleanResults scan(String taintedHTML, File policyFile) throws ScanException, PolicyException
scan() using the policy File object passed
in.ScanExceptionPolicyExceptionCopyright © 2013 The Open Web Application Security Project (OWASP). All rights reserved.