public class HtmlToHtmlContentContext extends Object implements XSSFilterRule
The cleanup is performed using the AntiSamy library found at http://www.owasp.org/index.php/AntiSamy
Constructor and Description |
---|
HtmlToHtmlContentContext() |
Modifier and Type | Method and Description |
---|---|
boolean |
check(PolicyHandler policyHandler,
String str)
Check to see if a given string contains policy violations.
|
String |
filter(PolicyHandler policyHandler,
String str)
Filter a given string to remove any policy violations.
|
boolean |
supportsPolicy() |
public boolean check(PolicyHandler policyHandler, String str)
XSSFilterRule
check
in interface XSSFilterRule
policyHandler
- the policy handler to use for filteringstr
- the input to checkXSSFilterRule.check(PolicyHandler, String)
public String filter(PolicyHandler policyHandler, String str)
XSSFilterRule
filter
in interface XSSFilterRule
policyHandler
- the policy handler to use for filteringstr
- the input to filterXSSFilterRule.filter(PolicyHandler, java.lang.String)
public boolean supportsPolicy()
supportsPolicy
in interface XSSFilterRule
XSSFilterRule.supportsPolicy()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.