public class HtmlSanitizerServiceImpl extends DefaultComponent implements HtmlSanitizerService
Modifier and Type | Field and Description |
---|---|
LinkedList<HtmlSanitizerAntiSamyDescriptor> |
allPolicies
All policies registered.
|
List<HtmlSanitizerDescriptor> |
allSanitizers
All sanitizers registered.
|
static String |
ANTISAMY_XP |
org.owasp.validator.html.Policy |
policy
Effective policy.
|
static String |
SANITIZER_XP |
List<HtmlSanitizerDescriptor> |
sanitizers
Effective sanitizers.
|
Constructor and Description |
---|
HtmlSanitizerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
sanitizeDocument(DocumentModel doc)
Sanitizes a document's fields, depending on the service configuration.
|
String |
sanitizeString(String string,
String info)
Sanitizes a string.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtension
public static final String ANTISAMY_XP
public static final String SANITIZER_XP
public LinkedList<HtmlSanitizerAntiSamyDescriptor> allPolicies
public org.owasp.validator.html.Policy policy
public List<HtmlSanitizerDescriptor> allSanitizers
public List<HtmlSanitizerDescriptor> sanitizers
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void sanitizeDocument(DocumentModel doc) throws ClientException
HtmlSanitizerService
sanitizeDocument
in interface HtmlSanitizerService
ClientException
public String sanitizeString(String string, String info)
HtmlSanitizerService
sanitizeString
in interface HtmlSanitizerService
string
- the string to sanitizeinfo
- additional info logged when something is sanitizedCopyright © 2013 Nuxeo SA. All Rights Reserved.