From 0a2892edc380aa11fb5474004e02fd4d86abdec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 20 Jun 2012 19:52:57 +0200 Subject: Fix html special chars in kopete nowlistening plugin This partially resolves Bug 944 --- kopete/plugins/nowlistening/nowlisteningplugin.cpp | 7 ++++--- 1 file 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 #include +#include #include #include @@ -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 + "
" + advert; + newBody = originalBody + "
" + 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 ); } -- cgit v1.2.1