diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2009-09-05 09:56:38 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2009-09-05 09:56:38 +0000 |
| commit | d2983aecee07161aba43ccd58ebbe50c9755641d (patch) | |
| tree | ce228c3a98678d40fb94a4aa31dad73c76220ad6 /source/QXmppMessage.cpp | |
| parent | b8f9cef75a43d5805a4a931bcaf10c1e3e520998 (diff) | |
| download | qxmpp-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.cpp | 7 |
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>";
|
