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
1 changed files with 2 additions and 1 deletions

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();
}