1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 07:22:07 +01:00

Properly escape PubSub item's text (SMACK-546)

This commit is contained in:
Florian Schmaus 2014-02-26 21:26:39 +01:00
parent 2c7f1efe80
commit f0c6d1f1d3

View file

@ -20,6 +20,7 @@ import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.pubsub.Item;
import org.jivesoftware.smackx.pubsub.PayloadItem;
import org.jivesoftware.smackx.pubsub.SimplePayload;
@ -101,7 +102,7 @@ public class ItemProvider implements PacketExtensionProvider
}
else if (parser.getEventType() == XmlPullParser.TEXT)
{
payloadText.append(parser.getText());
payloadText.append(StringUtils.escapeForXML(parser.getText()));
}
tag = parser.next();
}