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



##########
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("&", "&")

Review comment:
       This apache commons project has xml escape code for both xml version 1.0 
and 1.1.  It seems it might do more than this.  I think it would be worth a 
look...

##########
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("&", "&")

Review comment:
       
https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/StringEscapeUtils.html




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to