Class UtilCodec.HtmlEncoder

    • 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.
      java.lang.String sanitize​(java.lang.String original, java.lang.String contentTypeId)
      This method will start a configurable sanitizing process.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PERMISSIVE_POLICY

        public static final org.owasp.html.PolicyFactory PERMISSIVE_POLICY
      • BIRT_FLEXIBLE_REPORT_POLICY

        public static final org.owasp.html.PolicyFactory BIRT_FLEXIBLE_REPORT_POLICY
    • Constructor Detail

      • HtmlEncoder

        public HtmlEncoder()
    • Method Detail

      • 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 implement SanitizerCustomPolicy.
        Specified by:
        sanitize in interface UtilCodec.SimpleEncoder
        Parameters:
        original -
        contentTypeId -
        Returns:
        sanitized HTML-Code if enabled, original HTML-Code when disabled
        See Also:
        CustomPermissivePolicy