You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by GitBox <gi...@apache.org> on 2020/05/04 21:31:48 UTC

[GitHub] [uima-uimaj] reckart commented on a change in pull request #39: [UIMA-6225] Unable to install a pear package into a directory containing special character like <,> or &

reckart commented on a change in pull request #39:
URL: https://github.com/apache/uima-uimaj/pull/39#discussion_r419741389



##########
File path: uimaj-core/src/main/java/org/apache/uima/pear/util/XMLUtil.java
##########
@@ -828,4 +862,18 @@ public static void printXMLTag(String tag, Properties attributes, PrintWriter oW
     oWriter.print('>');
     oWriter.flush();
   }
+  
+  private static String xmlEscape(String value)
+  {
+      if (value == null) {
+          return value;
+      }
+      
+      return value
+              .replace("&", "&amp;")

Review comment:
       I expect if the user had already written `&amp;`, then it is because the path includes `&amp;` and not because the user wants the the stuff being unescaped. 
   
   I mean if you want to install a PEAR in `/tmp/&amp;foldername`, then you don't want to loo for it in `/tmp/&foldername`, right?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org