rombert commented on a change in pull request #1:  SLING-8266 - Stop embedding 
ESAPI
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-jsp-taglib/pull/1#discussion_r255434725
 
 

 ##########
 File path: 
src/main/java/org/apache/sling/scripting/jsp/taglib/helpers/XSSSupport.java
 ##########
 @@ -16,56 +16,89 @@
  */
 package org.apache.sling.scripting.jsp.taglib.helpers;
 
-import org.owasp.esapi.ESAPI;
+import org.apache.sling.xss.XSSAPI;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
 
 /**
  * Support for basic XSS protection as provided by the OWASP ESAPI's escape
  * methods.
  */
+@Component
 public class XSSSupport {
-
-    /**
-     * The encoding modes supported by this tag.
-     */
-    public enum ENCODING_MODE {
-        /**
-         * Encodes the content as HTML
-         */
-        HTML, HTML_ATTR, JS, XML, XML_ATTR
+    
+    @Reference
+    private XSSAPI xssApi;
+    
+    private static XSSAPI XSS_API;
 
 Review comment:
   Good catch, thank you.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to