You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2019/08/12 16:23:36 UTC

[sling-scriptingbundle-maven-plugin] branch master updated: corrected filter escaping

This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-scriptingbundle-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 8cf49f0  corrected filter escaping
8cf49f0 is described below

commit 8cf49f0c86c63dd06a5b3dadd3727f105bda2ca7
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Aug 12 18:23:28 2019 +0200

    corrected filter escaping
---
 .../sling/scriptingbundle/maven/plugin/ScriptingMavenPlugin.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scriptingbundle/maven/plugin/ScriptingMavenPlugin.java b/src/main/java/org/apache/sling/scriptingbundle/maven/plugin/ScriptingMavenPlugin.java
index 33881f0..efea423 100644
--- a/src/main/java/org/apache/sling/scriptingbundle/maven/plugin/ScriptingMavenPlugin.java
+++ b/src/main/java/org/apache/sling/scriptingbundle/maven/plugin/ScriptingMavenPlugin.java
@@ -18,6 +18,7 @@
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 package org.apache.sling.scriptingbundle.maven.plugin;
 
+import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -151,7 +152,7 @@ public class ScriptingMavenPlugin extends AbstractMojo
         {
             String[] parts = require.split(";");
             String rt = parts[0];
-            String filter = "(sling.resourceType=\"" + rt.replace("\"", "\\\"") + "\")";
+            String filter = "(sling.resourceType=" + rt.replace("\"", "\\\"") + ")";
 
             if (parts.length > 1)
             {