Package org.owasp.validator.html
Class InternalPolicy
java.lang.Object
org.owasp.validator.html.Policy
org.owasp.validator.html.InternalPolicy
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
ConstructorsModifierConstructorDescriptionprotected
InternalPolicy
(URL baseUrl, Policy.ParseContext parseContext) protected
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the maximum input size.int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
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 Details
-
InternalPolicy
- Throws:
PolicyException
-
InternalPolicy
-
-
Method Details
-
getEmbedTag
-
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
-
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_SIZE
is used.- Returns:
- the maximium input size.
-