diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java index 9e0ad4116..34ba270a5 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java @@ -273,9 +273,9 @@ public class XMLUtil { for (int i = 0; i < rawContent.length(); i++) { char ch = rawContent.charAt(i); - if (ch == '\'') - sb.append("'"); - else if (ch == '&') + // We don't escape ' because our code always spits out attributes surrounded by "", which means + // it's not necessary to escape ' - and it's *much* less ugly and more bandwidth-efficient when we don't. + if (ch == '&') sb.append("&"); else if (ch == '"') sb.append(""");