Skip to content

Commit

Permalink
Fix #2847 "Error producing PDF when input field contains ]]>"
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruchez committed Jul 14, 2016
1 parent 5052815 commit b2ae585
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/orbeon/oxf/xml/XMLUtils.java
Expand Up @@ -12,6 +12,7 @@ public class XMLUtils {
public static String unescapeXMLMinimal(String str) {
str = StringUtils.replace(str, "&", "&");
str = StringUtils.replace(str, "&lt;", "<");
str = StringUtils.replace(str, "&gt;", ">");
return str;
}

Expand Down Expand Up @@ -119,6 +120,7 @@ private static String nZeros(int n) {
public static String escapeXMLMinimal(String str) {
str = StringUtils.replace(str, "&", "&amp;");
str = StringUtils.replace(str, "<", "&lt;");
str = StringUtils.replace(str, ">", "&gt;"); // do this one too because the sequence `]]>` is not allowed
return str;
}

Expand Down

0 comments on commit b2ae585

Please sign in to comment.