summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-06-20 19:52:57 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-06-20 20:49:36 +0200
commitc149fdcb485e517b4333b6e209b88872b35efc70 (patch)
tree9076820f6478475a3a758a429b877db6c3acba66
parent16a78de1f2c976a97da2c041043e66e13fa722ae (diff)
downloadtdenetwork-c149fdcb485e517b4333b6e209b88872b35efc70.tar.gz
tdenetwork-c149fdcb485e517b4333b6e209b88872b35efc70.zip
Fix html special chars in kopete nowlistening plugin
This partially resolves Bug 994 (cherry picked from commit 2d699f523902244113eeec627ca6b9b18b740da0)
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
index a9148187..1f1fed51 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
@@ -20,6 +20,7 @@
#include <tqtimer.h>
#include <tqstringlist.h>
+#include <tqstylesheet.h>
#include <tqregexp.h>
#include <kdebug.h>
@@ -189,7 +190,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
if(!NowListeningConfig::self()->chatAdvertising())
return;
- TQString originalBody = msg.plainBody();
+ TQString originalBody = msg.escapedBody();
// If it is a /media message, don't process it
if(originalBody.startsWith(NowListeningConfig::self()->header()))
@@ -222,7 +223,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
{
TQString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update
if( !advert.isEmpty() )
- newBody = originalBody + "<br>" + advert;
+ newBody = originalBody + "<br>" + TQStyleSheet::escape(advert);
// If we send because the information has changed since it was last sent, we must
// rebuild the list of contacts the latest information was sent to.
@@ -501,7 +502,7 @@ void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, TQString
pl,
message,
Kopete::Message::Outbound,
- Kopete::Message::RichText );
+ Kopete::Message::PlainText );
theChat->sendMessage( msg );
}