From 8053fb7554d2a81be24582c5f40790bd902c44f0 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Fri, 28 Nov 2025 13:26:55 +0100 Subject: [PATCH] FELIX-6813 Revert escaping introduced via FELIX-6757 Escaping is already done in JSONWriter.quote when emitting the bundle properties as JSON. When emitting as text (via BundlesServlet.print(...)) no escaping is necessary at all. --- .../apache/felix/webconsole/internal/core/BundlesServlet.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java index 93ba3a2538..37b79f1db5 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java @@ -77,7 +77,6 @@ import org.osgi.service.packageadmin.PackageAdmin; import org.osgi.util.tracker.ServiceTracker; import org.osgi.util.tracker.ServiceTrackerCustomizer; -import org.owasp.encoder.Encode; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; @@ -764,7 +763,7 @@ private void keyVal(final List> props, final String key, fin final Map obj = new LinkedHashMap(); obj.put("key", key); if ( val instanceof String ) { - obj.put("value", Encode.forJavaScript((String)val)); + obj.put("value", val); // escaping happens when writing into JSON via JSONWriter } else { obj.put("value", val); }