diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-10-15 19:00:16 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-10-15 19:00:27 +0200 |
commit | f43fe7ee82192183c62767f0914a8dd64c4f4914 (patch) | |
tree | b49a2222f8487577907269451fe09ee9a5b6f161 /kopete/protocols/jabber | |
parent | a1ff2d63157dcfececfa14f49b355a9a22d525cb (diff) | |
download | tdenetwork-f43fe7ee82192183c62767f0914a8dd64c4f4914.tar.gz tdenetwork-f43fe7ee82192183c62767f0914a8dd64c4f4914.zip |
Kopete - jabber: Prevent startup crashes
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d6dc04becb5df5dae635b0ed17136c70a4e0166f)
Diffstat (limited to 'kopete/protocols/jabber')
-rw-r--r-- | kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp index 3521a628..9208b60a 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp @@ -84,17 +84,10 @@ static TQDomElement stripExtraNS(const TQDomElement &e) // to make it pretty. static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeTQName, bool clip) { - TQDomElement i = e.cloneNode().toElement(); - - // It seems TQDom can only have one namespace attribute at a time (see docElement 'HACK'). - // Fortunately we only need one kind depending on the input, so it is specified here. - TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeTQName); - fake.appendChild(i); - fake = stripExtraNS(fake); TQString out; { TQTextStream ts(&out, IO_WriteOnly); - fake.firstChild().save(ts, 0); + e.save(ts, 0); } // 'clip' means to remove any unwanted (and unneeded) characters, such as a trailing newline if(clip) { |