uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [uima-uimaj] mischor commented on a change in pull request #39: [UIMA-6225] Unable to install a pear package into a directory containing special character like <,> or &
Date Mon, 04 May 2020 21:29:05 GMT

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



##########
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 wonder if the user has already written &lt; for example, would this result in
&amplt; ? In other words, does the replacement need  to first confirm that the character
being replaced, isn't already in the right escape format?




----------------------------------------------------------------
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



Mime
View raw message