public interface Sanitizer
sanitizer.impl
portal property (see Sanitizer).
All installed sanitizers are chained.Modifier and Type | Field and Description |
---|---|
static String |
MODE_ALL |
static String |
MODE_BAD_WORDS |
static String |
MODE_XSS |
Modifier and Type | Method and Description |
---|---|
byte[] |
sanitize(long companyId,
long groupId,
long userId,
String className,
long classPK,
String contentType,
String[] modes,
byte[] bytes,
Map<String,Object> options)
Deprecated.
As of Wilberforce (7.0.x), replaced by
sanitize(long,
long, long, String, long, String, String[], String, Map) |
void |
sanitize(long companyId,
long groupId,
long userId,
String className,
long classPK,
String contentType,
String[] modes,
InputStream inputStream,
OutputStream outputStream,
Map<String,Object> options)
Deprecated.
As of Wilberforce (7.0.x), replaced by
sanitize(long,
long, long, String, long, String, String[], String, Map) |
String |
sanitize(long companyId,
long groupId,
long userId,
String className,
long classPK,
String contentType,
String[] modes,
String content,
Map<String,Object> options)
Returns the sanitized content as a string.
|
static final String MODE_ALL
static final String MODE_BAD_WORDS
static final String MODE_XSS
@Deprecated byte[] sanitize(long companyId, long groupId, long userId, String className, long classPK, String contentType, String[] modes, byte[] bytes, Map<String,Object> options) throws SanitizerException
sanitize(long,
long, long, String, long, String, String[], String, Map)
companyId
- the primary key of the portal instancegroupId
- the primary key of the site's groupuserId
- the user who changed the contentclassName
- the class name of the content model implementationclassPK
- the primary key of the content to sanitize,
0
if not availablecontentType
- the content type. For more information, see
ContentTypes
.modes
- ways in which to run the sanitizer, such as MODE_ALL
, MODE_BAD_WORDS
, and/or MODE_XSS
bytes
- the content to be sanitizedoptions
- a map of options for the sanitizerSanitizerException
- if a sanitizer exception occurred@Deprecated void sanitize(long companyId, long groupId, long userId, String className, long classPK, String contentType, String[] modes, InputStream inputStream, OutputStream outputStream, Map<String,Object> options) throws SanitizerException
sanitize(long,
long, long, String, long, String, String[], String, Map)
companyId
- the primary key of the portal instancegroupId
- the primary key of the site's groupuserId
- the user who changed the contentclassName
- the class name of the content model implementationclassPK
- the primary key of the content to sanitize,
0
if not availablecontentType
- the content type. For more information, see
ContentTypes
.modes
- ways in which to run the sanitizer, such as MODE_ALL
, MODE_BAD_WORDS
, and/or MODE_XSS
inputStream
- the content to be sanitizedoutputStream
- the result of the sanitizing processoptions
- a map of options for the sanitizerSanitizerException
- if a sanitizer exception occurredString sanitize(long companyId, long groupId, long userId, String className, long classPK, String contentType, String[] modes, String content, Map<String,Object> options) throws SanitizerException
companyId
- the primary key of the portal instancegroupId
- the primary key of the site's groupuserId
- the user who changed the contentclassName
- the class name of the content model implementationclassPK
- the primary key of the content to sanitize,
0
if not availablecontentType
- the content type. For more information, see ContentTypes
.modes
- ways in which to run the sanitizer, such as MODE_ALL
, MODE_BAD_WORDS
, and/or MODE_XSS
content
- the content to sanitizeoptions
- the options mapSanitizerException
- if a sanitizer exception occurred