aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppMessage.cpp
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2009-09-05 09:56:38 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2009-09-05 09:56:38 +0000
commitd2983aecee07161aba43ccd58ebbe50c9755641d (patch)
treece228c3a98678d40fb94a4aa31dad73c76220ad6 /source/QXmppMessage.cpp
parentb8f9cef75a43d5805a4a931bcaf10c1e3e520998 (diff)
downloadqxmpp-d2983aecee07161aba43ccd58ebbe50c9755641d.tar.gz
Fix Issue 2: problem when sending messages with < or > characters in body fields
Fix Issue 3: QXmppClient::connected signal
Diffstat (limited to 'source/QXmppMessage.cpp')
-rw-r--r--source/QXmppMessage.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/QXmppMessage.cpp b/source/QXmppMessage.cpp
index 3dc19ce5..42dd5308 100644
--- a/source/QXmppMessage.cpp
+++ b/source/QXmppMessage.cpp
@@ -28,9 +28,8 @@
QXmppMessage::QXmppMessage(const QString& from, const QString& to, const
QString& body, const QString& thread)
- : QXmppStanza(from, to), m_type(Chat), m_body(body), m_thread(thread)
+ : QXmppStanza(from, to), m_type(Chat), m_thread(thread), m_body(body)
{
-
}
QXmppMessage::~QXmppMessage()
@@ -126,8 +125,8 @@ QByteArray QXmppMessage::toXml() const
helperToXmlAddAttribute(stream, "from", getFrom());
helperToXmlAddAttribute(stream, "type", getTypeStr());
stream << ">";
- helperToXmlAddElement(stream, "subject", getSubject());
- helperToXmlAddElement(stream, "body", getBody());
+ helperToXmlAddElement(stream, "subject", escapeString(getSubject()));
+ helperToXmlAddElement(stream, "body", escapeString(getBody()));
helperToXmlAddElement(stream, "thread", getThread());
stream << getError().toXml();
stream << "</message>";