Don't interpret HTML in KNotify popups, fixes #631
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 12 Apr 2009 09:14:24 +0000 (11:14 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 12 Apr 2009 09:18:11 +0000 (11:18 +0200)
src/qtui/knotificationbackend.cpp

index 99d52f8..f27a9d7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <KNotification>
 #include <KNotifyConfigWidget>
+#include <QTextDocument>
 
 #include "knotificationbackend.h"
 
@@ -49,7 +50,7 @@ void KNotificationBackend::notify(const Notification &n) {
       type = "PrivMsgFocused"; break;
   }
 
-  QString message = QString("<b>&lt;%1&gt;</b> %2").arg(n.sender, n.message);
+  QString message = QString("<b>&lt;%1&gt;</b> %2").arg(n.sender, Qt::escape(n.message));
   KNotification *notification = KNotification::event(type, message, DesktopIcon("dialog-information"), QtUi::mainWindow(),
                                 KNotification::Persistent|KNotification::RaiseWidgetOnActivation|KNotification::CloseWhenWidgetActivated);
   connect(notification, SIGNAL(activated(uint)), SLOT(notificationActivated()));