Package org.owasp.html
Class DynamicAttributesSanitizerPolicy
java.lang.Object
org.owasp.html.DynamicAttributesSanitizerPolicy
- All Implemented Interfaces:
org.owasp.html.HtmlSanitizer.Policy
,org.owasp.html.HtmlStreamEventReceiver
Extends the default policy to support dynamic attributes.
Since we want to support the antisamy config file, we have to make dynamic
tag attributes possible.
It is placed in the 'org.owasp.html' package because there are package
private fields.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicAttributesSanitizerPolicy
(org.owasp.html.HtmlStreamEventReceiver out, Map<String, org.owasp.html.ElementAndAttributePolicies> elAndAttrPolicies, Set<String> allowedTextContainers, Map<String, org.owasp.html.AttributePolicy> dynamicAttributesPolicyMap, List<String> onInvalidRemoveTagList) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
int
void
void
void
-
Constructor Details
-
DynamicAttributesSanitizerPolicy
public DynamicAttributesSanitizerPolicy(org.owasp.html.HtmlStreamEventReceiver out, Map<String, org.owasp.html.ElementAndAttributePolicies> elAndAttrPolicies, Set<String> allowedTextContainers, Map<String, org.owasp.html.AttributePolicy> dynamicAttributesPolicyMap, List<String> onInvalidRemoveTagList)
-
-
Method Details
-
openTag
- Specified by:
openTag
in interfaceorg.owasp.html.HtmlSanitizer.Policy
- Specified by:
openTag
in interfaceorg.owasp.html.HtmlStreamEventReceiver
-
getNumberOfErrors
public int getNumberOfErrors() -
openDocument
public void openDocument()- Specified by:
openDocument
in interfaceorg.owasp.html.HtmlStreamEventReceiver
-
closeDocument
public void closeDocument()- Specified by:
closeDocument
in interfaceorg.owasp.html.HtmlStreamEventReceiver
-
text
- Specified by:
text
in interfaceorg.owasp.html.HtmlSanitizer.Policy
- Specified by:
text
in interfaceorg.owasp.html.HtmlStreamEventReceiver
-
closeTag
- Specified by:
closeTag
in interfaceorg.owasp.html.HtmlSanitizer.Policy
- Specified by:
closeTag
in interfaceorg.owasp.html.HtmlStreamEventReceiver
-