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 TypeMethodDescriptionvoidvoidintvoidvoidvoid
-
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:
openTagin interfaceorg.owasp.html.HtmlSanitizer.Policy- Specified by:
openTagin interfaceorg.owasp.html.HtmlStreamEventReceiver
-
getNumberOfErrors
public int getNumberOfErrors() -
openDocument
public void openDocument()- Specified by:
openDocumentin interfaceorg.owasp.html.HtmlStreamEventReceiver
-
closeDocument
public void closeDocument()- Specified by:
closeDocumentin interfaceorg.owasp.html.HtmlStreamEventReceiver
-
text
- Specified by:
textin interfaceorg.owasp.html.HtmlSanitizer.Policy- Specified by:
textin interfaceorg.owasp.html.HtmlStreamEventReceiver
-
closeTag
- Specified by:
closeTagin interfaceorg.owasp.html.HtmlSanitizer.Policy- Specified by:
closeTagin interfaceorg.owasp.html.HtmlStreamEventReceiver
-