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
public class DynamicAttributesSanitizerPolicy extends Object
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
Constructors Constructor Description DynamicAttributesSanitizerPolicy(org.owasp.html.HtmlStreamEventReceiver out, com.google.common.collect.ImmutableMap<String,org.owasp.html.ElementAndAttributePolicies> elAndAttrPolicies, com.google.common.collect.ImmutableSet<String> allowedTextContainers, Map<String,org.owasp.html.AttributePolicy> dynamicAttributesPolicyMap, List<String> onInvalidRemoveTagList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseDocument()voidcloseTag(String arg0)intgetNumberOfErrors()voidopenDocument()voidopenTag(String elementName, List<String> attrs)voidtext(String arg0)
-
-
-
Constructor Detail
-
DynamicAttributesSanitizerPolicy
public DynamicAttributesSanitizerPolicy(org.owasp.html.HtmlStreamEventReceiver out, com.google.common.collect.ImmutableMap<String,org.owasp.html.ElementAndAttributePolicies> elAndAttrPolicies, com.google.common.collect.ImmutableSet<String> allowedTextContainers, Map<String,org.owasp.html.AttributePolicy> dynamicAttributesPolicyMap, List<String> onInvalidRemoveTagList)
-
-
Method Detail
-
openTag
public void openTag(String elementName, List<String> attrs)
- 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
public void text(String arg0)
- Specified by:
textin interfaceorg.owasp.html.HtmlSanitizer.Policy- Specified by:
textin interfaceorg.owasp.html.HtmlStreamEventReceiver
-
closeTag
public void closeTag(String arg0)
- Specified by:
closeTagin interfaceorg.owasp.html.HtmlSanitizer.Policy- Specified by:
closeTagin interfaceorg.owasp.html.HtmlStreamEventReceiver
-
-