Package org.apache.sling.xss.impl
Interface XSSFilterRule
-
- All Known Implementing Classes:
HtmlToHtmlContentContext
,PlainTextToHtmlContentContext
public interface XSSFilterRule
This interface defines a protection context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
check(PolicyHandler policyHandler, String src)
Check to see if a given string contains policy violations.String
filter(PolicyHandler policyHandler, String src)
Filter a given string to remove any policy violations.boolean
supportsPolicy()
-
-
-
Method Detail
-
check
boolean check(PolicyHandler policyHandler, String src)
Check to see if a given string contains policy violations.- Parameters:
policyHandler
- the policy handler to use for filteringsrc
- the input to check- Returns:
- true if the source string is free of policy violations (as defined by policyHandler)
-
filter
String filter(PolicyHandler policyHandler, String src)
Filter a given string to remove any policy violations.- Parameters:
policyHandler
- the policy handler to use for filteringsrc
- the input to filter- Returns:
- a filtered string which is "safe" (as defined by policyHandler)
-
supportsPolicy
boolean supportsPolicy()
-
-