1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-07 21:51:07 +01:00

Introduce and use XmlStringBuilder.text()

Smack currently does unnecessary escaping of XML text, where it
escapes e.g. '"' to '"'. This bloats the stanza size, especially
if JSON payloads are involved.

Fixes SMACK-892 (although there are probably still places where
XmlStringBuilder.escape() is used when XmlStringBuild.text() could
have been used).
This commit is contained in:
Florian Schmaus 2020-09-17 12:31:35 +02:00
parent 9e9d30074c
commit b7824f008d
6 changed files with 29 additions and 7 deletions

View file

@ -33,7 +33,7 @@ import org.jxmpp.jid.impl.JidCreate;
public class MarkableExtensionTest {
String markableMessageStanza = "<message xmlns='jabber:client' to='ingrichard@royalty.england.lit/throne' id='message-1'>"
+ "<body>My lord, dispatch; read o&apos;er these articles.</body>"
+ "<body>My lord, dispatch; read o'er these articles.</body>"
+ "<markable xmlns='urn:xmpp:chat-markers:0'/>" + "</message>";
String markableExtension = "<markable xmlns='urn:xmpp:chat-markers:0'/>";