Package com.day.cq.wcm.foundation.utils
Class RTEUtils
- java.lang.Object
-
- com.day.cq.wcm.foundation.utils.RTEUtils
-
public class RTEUtils extends java.lang.ObjectRich Text Editor Utilities
-
-
Constructor Summary
Constructors Constructor Description RTEUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreateFilteredJSONResponse(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String propertyName, XSSAPI xssApi, boolean filterXSS)Create a JSON response containing XSS filtered JSON of a resource.
-
-
-
Method Detail
-
createFilteredJSONResponse
public static void createFilteredJSONResponse(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String propertyName, XSSAPI xssApi, boolean filterXSS) throws JSONException, java.io.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:
JSONExceptionjava.io.IOException
-
-