Package org.owasp.validator.html
Class InternalPolicy
- java.lang.Object
-
- org.owasp.validator.html.Policy
-
- org.owasp.validator.html.InternalPolicy
-
public class InternalPolicy extends Policy
Contains a bunch of optimized lookups over the regular Policy Class. For internal use only. Not part of any public api and may explode or self destruct at any given moment, preferably both.- Author:
- Kristian Rosenvold
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.owasp.validator.html.Policy
Policy.ParseContext
-
-
Field Summary
-
Fields inherited from class org.owasp.validator.html.Policy
ACTION_FILTER, ACTION_TRUNCATE, ACTION_VALIDATE, ANCHORS_NOFOLLOW, ANYTHING_REGEXP, CONNECTION_TIMEOUT, DEFAULT_MAX_INPUT_SIZE, DEFAULT_MAX_STYLESHEET_IMPORTS, DEFAULT_POLICY_URI, directives, EMBED_STYLESHEETS, ENTITY_ENCODE_INTL_CHARS, FORMAT_OUTPUT, OMIT_DOCTYPE_DECLARATION, OMIT_XML_DECLARATION, PRESERVE_COMMENTS, PRESERVE_SPACE, tagRules, USE_XHTML, VALIDATE_PARAM_AS_EMBED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInternalPolicy(java.net.URL baseUrl, Policy.ParseContext parseContext)protectedInternalPolicy(Policy old, java.util.Map<java.lang.String,java.lang.String> directives, java.util.Map<java.lang.String,Tag> tagRules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdetermineMaxInputSize()Returns the maximum input size.TaggetEmbedTag()intgetMaxInputSize()java.lang.StringgetOnUnknownTag()TaggetStyleTag()booleanisEmbedStyleSheets()booleanisEncodeUnknownTag()booleanisEntityEncodeIntlCharacters()booleanisFormatOutput()booleanisNofollowAnchors()booleanisOmitDoctypeDeclaration()booleanisOmitXmlDeclaration()booleanisPreserveComments()booleanisPreserveSpace()booleanisUseXhtml()booleanisValidateParamAsEmbed()-
Methods inherited from class org.owasp.validator.html.Policy
cloneWithDirective, getAllowedEmptyTags, getCommonRegularExpressions, getDirective, getGlobalAttributeByName, getInstance, getInstance, getInstance, getInstance, getInstance, getParseContext, getPropertyByName, getRequiresClosingTags, getSimpleParseContext, getTagByLowercaseName, getTopLevelElement, getTopLevelElement, resolveEntity
-
-
-
-
Constructor Detail
-
InternalPolicy
protected InternalPolicy(java.net.URL baseUrl, Policy.ParseContext parseContext) throws PolicyException- Throws:
PolicyException
-
-
Method Detail
-
getEmbedTag
public Tag getEmbedTag()
-
getStyleTag
public Tag getStyleTag()
-
isEmbedStyleSheets
public boolean isEmbedStyleSheets()
-
isPreserveComments
public boolean isPreserveComments()
-
getMaxInputSize
public int getMaxInputSize()
-
isEntityEncodeIntlCharacters
public boolean isEntityEncodeIntlCharacters()
-
isNofollowAnchors
public boolean isNofollowAnchors()
-
isValidateParamAsEmbed
public boolean isValidateParamAsEmbed()
-
isFormatOutput
public boolean isFormatOutput()
-
isPreserveSpace
public boolean isPreserveSpace()
-
isOmitXmlDeclaration
public boolean isOmitXmlDeclaration()
-
isUseXhtml
public boolean isUseXhtml()
-
isOmitDoctypeDeclaration
public boolean isOmitDoctypeDeclaration()
-
getOnUnknownTag
public java.lang.String getOnUnknownTag()
-
isEncodeUnknownTag
public boolean isEncodeUnknownTag()
-
determineMaxInputSize
public int determineMaxInputSize()
Returns the maximum input size. If this value is not specified by the policy, theDEFAULT_MAX_INPUT_SIZEis used.- Returns:
- the maximium input size.
-
-