Package com.day.cq.wcm.foundation.utils
Class RTEUtils
java.lang.Object
com.day.cq.wcm.foundation.utils.RTEUtils
Rich Text Editor Utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateFilteredJSONResponse(SlingHttpServletRequest request, SlingHttpServletResponse response, String propertyName, XSSAPI xssApi, boolean filterXSS) Create a JSON response containing XSS filtered JSON of a resource.
-
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 requestpropertyName- The name of the property to filterxssApi- A reference to the XSSAPI to usefilterXSS- Whether or not to enable the XSS filter- Throws:
JSONExceptionIOException
-