Package org.apache.ofbiz.base.util
Class UtilCodec.HtmlEncoder
- java.lang.Object
-
- org.apache.ofbiz.base.util.UtilCodec.HtmlEncoder
-
- All Implemented Interfaces:
UtilCodec.SimpleEncoder
- Enclosing class:
- UtilCodec
public static class UtilCodec.HtmlEncoder extends java.lang.Object implements UtilCodec.SimpleEncoder
-
-
Field Summary
Fields Modifier and Type Field Description static org.owasp.html.PolicyFactory
BIRT_FLEXIBLE_REPORT_POLICY
static org.owasp.html.PolicyFactory
PERMISSIVE_POLICY
-
Constructor Summary
Constructors Constructor Description HtmlEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
encode(java.lang.String original)
java.lang.String
sanitize(java.lang.String original)
Deprecated.Usesanitize(String,String)
insteadjava.lang.String
sanitize(java.lang.String original, java.lang.String contentTypeId)
This method will start a configurable sanitizing process.
-
-
-
Method Detail
-
encode
public java.lang.String encode(java.lang.String original)
- Specified by:
encode
in interfaceUtilCodec.SimpleEncoder
-
sanitize
@Deprecated public java.lang.String sanitize(java.lang.String original)
Deprecated.Usesanitize(String,String)
instead- Specified by:
sanitize
in interfaceUtilCodec.SimpleEncoder
-
sanitize
public java.lang.String sanitize(java.lang.String original, java.lang.String contentTypeId)
This method will start a configurable sanitizing process. The sanitizer can be turns off through "sanitizer.enable=false", the default value is true. It is possible to configure a custom policy using the properties "sanitizer.permissive.policy" and "sanitizer.custom.permissive.policy.class". The custom policy has to implementSanitizerCustomPolicy
.- Specified by:
sanitize
in interfaceUtilCodec.SimpleEncoder
- Parameters:
original
-contentTypeId
-- Returns:
- sanitized HTML-Code if enabled, original HTML-Code when disabled
- See Also:
CustomPermissivePolicy
-
-