mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 15:32:06 +01:00
Properly escape PubSub item's text (SMACK-546)
This commit is contained in:
parent
2c7f1efe80
commit
f0c6d1f1d3
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ import org.jivesoftware.smack.packet.PacketExtension;
|
||||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||||
import org.jivesoftware.smack.provider.ProviderManager;
|
import org.jivesoftware.smack.provider.ProviderManager;
|
||||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||||
|
import org.jivesoftware.smack.util.StringUtils;
|
||||||
import org.jivesoftware.smackx.pubsub.Item;
|
import org.jivesoftware.smackx.pubsub.Item;
|
||||||
import org.jivesoftware.smackx.pubsub.PayloadItem;
|
import org.jivesoftware.smackx.pubsub.PayloadItem;
|
||||||
import org.jivesoftware.smackx.pubsub.SimplePayload;
|
import org.jivesoftware.smackx.pubsub.SimplePayload;
|
||||||
|
@ -101,7 +102,7 @@ public class ItemProvider implements PacketExtensionProvider
|
||||||
}
|
}
|
||||||
else if (parser.getEventType() == XmlPullParser.TEXT)
|
else if (parser.getEventType() == XmlPullParser.TEXT)
|
||||||
{
|
{
|
||||||
payloadText.append(parser.getText());
|
payloadText.append(StringUtils.escapeForXML(parser.getText()));
|
||||||
}
|
}
|
||||||
tag = parser.next();
|
tag = parser.next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue