incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1127020 - in /sling/trunk/bundles/engine: pom.xml src/main/java/org/apache/sling/engine/impl/request/RequestHistoryConsolePlugin.java
Date Tue, 24 May 2011 13:09:51 GMT
Author: bdelacretaz
Date: Tue May 24 13:09:51 2011
New Revision: 1127020

URL: http://svn.apache.org/viewvc?rev=1127020&view=rev
Log:
SLING-2085 - use ResponseUtil for escaping

Modified:
    sling/trunk/bundles/engine/pom.xml
    sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/RequestHistoryConsolePlugin.java

Modified: sling/trunk/bundles/engine/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/pom.xml?rev=1127020&r1=1127019&r2=1127020&view=diff
==============================================================================
--- sling/trunk/bundles/engine/pom.xml (original)
+++ sling/trunk/bundles/engine/pom.xml Tue May 24 13:09:51 2011
@@ -97,7 +97,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.2.1-SNAPSHOT</version>
+            <version>2.1.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/RequestHistoryConsolePlugin.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/RequestHistoryConsolePlugin.java?rev=1127020&r1=1127019&r2=1127020&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/RequestHistoryConsolePlugin.java
(original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/RequestHistoryConsolePlugin.java
Tue May 24 13:09:51 2011
@@ -35,8 +35,8 @@ import javax.servlet.http.HttpServletRes
 
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.request.RequestProgressTracker;
+import org.apache.sling.api.request.ResponseUtil;
 import org.apache.sling.api.resource.ResourceUtil;
-import org.apache.sling.api.servlets.HtmlResponse;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -146,11 +146,11 @@ public class RequestHistoryConsolePlugin
                             currentRequestIndex);
                         final StringBuilder sb = new StringBuilder();
                         sb.append("<a href='" + LABEL + "?index="
-                            + HtmlResponse.escapeHtmlText(info.getKey()) + "'>");
+                            + ResponseUtil.escapeXml(info.getKey()) + "'>");
                         if (isCurrent) {
                             sb.append("<b>");
                         }
-                        sb.append(HtmlResponse.escapeHtmlText(info.getLabel()));
+                        sb.append(ResponseUtil.escapeXml(info.getLabel()));
                         if (isCurrent) {
                             sb.append("</b>");
                         }
@@ -227,8 +227,8 @@ public class RequestHistoryConsolePlugin
                 pw.println("<tr>");
                 pw.printf(
                     "<th class='ui-widget-header'>Request %s (%s %s) by %s - RequestProgressTracker
Info</th>%n",
-                    key, HtmlResponse.escapeHtmlText(info.getMethod()), 
-                    HtmlResponse.escapeHtmlText(info.getPathInfo()), HtmlResponse.escapeHtmlText(info.getUser()));
+                    key, ResponseUtil.escapeXml(info.getMethod()), 
+                    ResponseUtil.escapeXml(info.getPathInfo()), ResponseUtil.escapeXml(info.getUser()));
                 pw.println("</tr>");
                 pw.println("</thead>");
 
@@ -239,7 +239,7 @@ public class RequestHistoryConsolePlugin
                 final Iterator<String> it = info.getTracker().getMessages();
                 pw.print("<pre>");
                 while (it.hasNext()) {
-                    pw.print(HtmlResponse.escapeHtmlText(it.next()));
+                    pw.print(ResponseUtil.escapeXml(it.next()));
                 }
                 pw.println("</pre></td></tr>");
                 pw.println("</tbody></table>");



Mime
View raw message