public class PolicyConfiguredCleaner extends Object implements StorageFormatCleaner, RenderedContentCleaner, XhtmlCleaner
StorageFormatCleaner.AppliedRuleDescription, StorageFormatCleaner.Result
XhtmlCleaner.AppliedRuleDescription, XhtmlCleaner.Result
Constructor and Description |
---|
PolicyConfiguredCleaner(String policyResource)
Constructor that will lazily load the Transformer as it is required.
|
Modifier and Type | Method and Description |
---|---|
XhtmlCleaner.Result |
clean(ContentEntityObject uncleanCeo)
Clean the supplied body content markup and make it safe from security concerns.
|
StorageFormatCleaner.Result |
cleanEntity(ContentEntityObject uncleanCeo)
Clean the supplied body content markup and make it safe from security concerns.
|
String |
cleanQuietly(ContentEntityObject uncleanCeo)
Clean the specified body content markup and make it safe from security concerns with out reporting any clean up
performed
|
String |
cleanQuietly(String unclean)
Clean the specified String.
|
String |
cleanQuietly(String unclean,
ConversionContext context)
Clean the specified String.
|
String |
cleanStyleAttribute(String uncleanStyle)
Convert the supplied value of an HTML style attribute into a safe form if necessary.
|
boolean |
isCleanUrlAttribute(String urlValue)
Test that the supplied value of a URL type attribute (such as href) is safe for output.
|
public PolicyConfiguredCleaner(String policyResource)
policyResource
- the resource file holding the security policy.public XhtmlCleaner.Result clean(ContentEntityObject uncleanCeo)
XhtmlCleaner
clean
in interface XhtmlCleaner
uncleanCeo
- a CEO containing the body content to be processed. The CEO is not modified, but the cleaned
body content is returned.public StorageFormatCleaner.Result cleanEntity(ContentEntityObject uncleanCeo)
StorageFormatCleaner
cleanEntity
in interface StorageFormatCleaner
uncleanCeo
- a CEO containing the body content to be processed. The CEO is not modified, but the cleaned
body content is returned.public String cleanQuietly(ContentEntityObject uncleanCeo)
StorageFormatCleaner
cleanQuietly
in interface StorageFormatCleaner
cleanQuietly
in interface XhtmlCleaner
uncleanCeo
- a CEO containing the body content to be processed. The CEO is not modified, but the cleaned
body content is returned.public String cleanQuietly(String unclean, ConversionContext context)
StorageFormatCleaner
cleanQuietly
in interface StorageFormatCleaner
cleanQuietly
in interface XhtmlCleaner
unclean
- the String to be cleanedcontext
- The ConversionContext that applies to the provided content.public String cleanQuietly(String unclean)
StorageFormatCleaner
cleanQuietly
in interface RenderedContentCleaner
cleanQuietly
in interface StorageFormatCleaner
cleanQuietly
in interface XhtmlCleaner
unclean
- the String to be cleanedpublic String cleanStyleAttribute(String uncleanStyle)
StorageFormatCleaner
cleanStyleAttribute
in interface RenderedContentCleaner
cleanStyleAttribute
in interface StorageFormatCleaner
cleanStyleAttribute
in interface XhtmlCleaner
uncleanStyle
- the style attribute value to be cleanedpublic boolean isCleanUrlAttribute(String urlValue)
StorageFormatCleaner
isCleanUrlAttribute
in interface RenderedContentCleaner
isCleanUrlAttribute
in interface StorageFormatCleaner
isCleanUrlAttribute
in interface XhtmlCleaner
Copyright © 2003–2019 Atlassian. All rights reserved.