Package org.xwiki.xml.html
Interface HTMLElementSanitizer
-
@Role @Unstable public interface HTMLElementSanitizer
Provides methods to check if HTML elements and attributes/attribute values are considered safe.This also includes SVG and MathML elements and attributes.
- Since:
- 14.6RC1
- Version:
- $Id: 038435d19a997b0b67a588e0499d0d44f47b1d7b $
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXECUTION_CONTEXT_HINT_KEYThe key under which a hint can be stored that will be used by the default implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisAttributeAllowed(String elementName, String attributeName, String value)booleanisElementAllowed(String elementName)
-
-
-
Field Detail
-
EXECUTION_CONTEXT_HINT_KEY
static final String EXECUTION_CONTEXT_HINT_KEY
The key under which a hint can be stored that will be used by the default implementation.- See Also:
- Constant Field Values
-
-
Method Detail
-
isElementAllowed
boolean isElementAllowed(String elementName)
- Parameters:
elementName- the name of the HTML element- Returns:
trueif the given element is allowed in principle (given appropriate attributes)
-
isAttributeAllowed
boolean isAttributeAllowed(String elementName, String attributeName, String value)
- Parameters:
elementName- the element for which the attributes shall be checkedattributeName- the attributes to checkvalue- the value of the attribute- Returns:
trueif the attribute with this value is considered safe
-
-