Reitroduced escaping of char '>' for symmetry with '<'
@@ -22,7 +22,7 @@ public class XMLUtils {
for (int i = 0; i < string.length(); i++) {
char c = string.charAt(i);
- if (builder == null && (c == '&' || c == '<')) {
+ if (builder == null && (c == '&' || c == '<' || c == '>')) {
builder = new StringBuilder((int) (string.length() * 1.4));
builder.append(string, 0, i);
}
@@ -34,6 +34,9 @@ public class XMLUtils {
case '<':
builder.append("&lt;");
break;
+ case '>':
+ builder.append("&gt;");
+ break;
default:
if (builder != null)
builder.append(c);
