Index
All Classes and Interfaces|All Packages
C
- check(ProtectionContext, String) - Method in interface org.apache.sling.xss.XSSFilter
-
Indicates whether or not a given source string contains XSS policy violations.
D
- DEFAULT_CONTEXT - Static variable in interface org.apache.sling.xss.XSSFilter
-
Default context.
E
- encodeForCSSString(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Encodes a source string for writing to CSS string content.
- encodeForHTML(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Encodes a source string for HTML element content.
- encodeForHTMLAttr(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Encodes a source string for writing to an HTML attribute value.
- encodeForJSString(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Encodes a source string for writing to JavaScript string content.
- encodeForXML(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Encodes a source string for XML element content.
- encodeForXMLAttr(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Encodes a source string for writing to an XML attribute value.
F
- filter(String) - Method in interface org.apache.sling.xss.XSSFilter
-
Prevents the given source string from containing XSS stuff.
- filter(ProtectionContext, String) - Method in interface org.apache.sling.xss.XSSFilter
-
Protects the given source string from containing XSS stuff.
- filterHTML(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Filters potentially user-contributed HTML to meet the AntiSamy policy rules currently in effect for HTML output (see the XSSFilter service for details).
- fromName(String) - Static method in enum org.apache.sling.xss.ProtectionContext
-
Gets a protection context from the specified name.
G
- getName() - Method in enum org.apache.sling.xss.ProtectionContext
-
Gets the name of the protection context.
- getValidCSSColor(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a CSS color value.
- getValidDimension(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a string which should contain a dimension, returning a default value if the source is empty, can't be parsed, or contains XSS risks.
- getValidDouble(String, double) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a string which should contain an double, returning a default value if the source is
null
, empty, can't be parsed, or contains XSS risks. - getValidHref(String) - Method in interface org.apache.sling.xss.XSSAPI
-
Sanitizes a URL for writing as an HTML href or src attribute value.
- getValidInteger(String, int) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a string which should contain an integer, returning a default value if the source is
null
, empty, can't be parsed, or contains XSS risks. - getValidJSON(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a JSON string
- getValidJSToken(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a Javascript token.
- getValidLong(String, long) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a string which should contain a long, returning a default value if the source is
null
, empty, can't be parsed, or contains XSS risks. - getValidMultiLineComment(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate multi-line comment to be used inside a <script>...</script> or <style>...</style> block.
- getValidStyleToken(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate a style/CSS token.
- getValidXML(String, String) - Method in interface org.apache.sling.xss.XSSAPI
-
Validate an XML string
H
- HTML_HTML_CONTENT - Enum constant in enum org.apache.sling.xss.ProtectionContext
-
Escape HTML for use inside element content (rules #6 and - to some degree - #1), using a policy to remove potentially malicous HTML
I
- isValidHref(String) - Method in interface org.apache.sling.xss.XSSFilter
-
Checks if the given URL is valid to be used for the
href
attribute in aa
tag.
O
- org.apache.sling.xss - package org.apache.sling.xss
-
XSS Protection Service
P
- PLAIN_HTML_CONTENT - Enum constant in enum org.apache.sling.xss.ProtectionContext
-
Escape plain text for use inside HTML content (rule #1)
- ProtectionContext - Enum in org.apache.sling.xss
-
This enumeration defines the context for executing XSS protection.
V
- valueOf(String) - Static method in enum org.apache.sling.xss.ProtectionContext
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum org.apache.sling.xss.ProtectionContext
-
Returns an array containing the constants of this enum type, in the order they are declared.
X
- XSSAPI - Interface in org.apache.sling.xss
-
A service providing validators and encoders for XSS protection during the composition of HTML pages.
- XSSFilter - Interface in org.apache.sling.xss
-
This service should be used to protect output against potential XSS attacks.
All Classes and Interfaces|All Packages