Class RTEUtils

java.lang.Object
com.day.cq.wcm.foundation.utils.RTEUtils

public class RTEUtils extends Object
Rich Text Editor Utilities
  • Constructor Details

    • RTEUtils

      public RTEUtils()
  • Method Details

    • createFilteredJSONResponse

      public static void createFilteredJSONResponse(SlingHttpServletRequest request, SlingHttpServletResponse response, String propertyName, XSSAPI xssApi, boolean filterXSS) throws JSONException, IOException
      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
      Parameters:
      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
      Throws:
      JSONException
      IOException