Fix XML escaping to not escape single-quotes - because our XML serializer always wraps attributes in double-quotes, making escaping unnecessary.
This commit is contained in:
parent
685ea98d37
commit
a5302b8934
|
@ -273,9 +273,9 @@ public class XMLUtil {
|
||||||
|
|
||||||
for (int i = 0; i < rawContent.length(); i++) {
|
for (int i = 0; i < rawContent.length(); i++) {
|
||||||
char ch = rawContent.charAt(i);
|
char ch = rawContent.charAt(i);
|
||||||
if (ch == '\'')
|
// We don't escape ' because our code always spits out attributes surrounded by "", which means
|
||||||
sb.append("'");
|
// it's not necessary to escape ' - and it's *much* less ugly and more bandwidth-efficient when we don't.
|
||||||
else if (ch == '&')
|
if (ch == '&')
|
||||||
sb.append("&");
|
sb.append("&");
|
||||||
else if (ch == '"')
|
else if (ch == '"')
|
||||||
sb.append(""");
|
sb.append(""");
|
||||||
|
|
Loading…
Reference in New Issue