Class RTEUtils

  • public class RTEUtils
    extends java.lang.Object
    Rich Text Editor Utilities
    • Constructor Detail

      • RTEUtils

        public RTEUtils()
    • Method Detail

      • createFilteredJSONResponse

        public static void createFilteredJSONResponse​(SlingHttpServletRequest request,
                                                      SlingHttpServletResponse response,
                                                      java.lang.String propertyName,
                                                      XSSAPI xssApi,
                                                      boolean filterXSS)
                                               throws JSONException,
        Create a JSON response containing XSS filtered JSON of a resource. It will recursively filter all properties of name 'propertyName' if the respective node has 'textIsRich' set to "true", The maximum recursion depth (or INFINITY) is read from the selector
        request - The Sling request
        propertyName - The name of the property to filter
        xssApi - A reference to the XSSAPI to use
        filterXSS - Whether or not to enable the XSS filter