1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 18:29:45 +02:00

Improve StringUtils.escapeForXml()

This commit is contained in:
Florian Schmaus 2016-01-13 15:04:01 +01:00
parent f2a748db9a
commit e6a9027cc6
11 changed files with 169 additions and 43 deletions

View file

@ -85,7 +85,7 @@ public class Macros extends IQ {
if (getPersonalMacroGroup() != null) {
// CHECKSTYLE:OFF
buf.append("<personalMacro>");
buf.append(StringUtils.escapeForXML(getPersonalMacroGroup().toXML()));
buf.append(StringUtils.escapeForXmlText(getPersonalMacroGroup().toXML()));
buf.append("</personalMacro>");
// CHECKSTYLE:ON
}

View file

@ -97,7 +97,7 @@ public class MetaDataUtils {
for (Iterator<String> it = value.iterator(); it.hasNext();) {
String v = it.next();
buf.append("<value name=\"").append(key).append("\">");
buf.append(StringUtils.escapeForXML(v));
buf.append(StringUtils.escapeForXmlText(v));
buf.append("</value>");
}
}