[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.0/kdegraphics/okular/ui
From:       Pino Toscano <pino () kde ! org>
Date:       2008-04-03 9:52:07
Message-ID: 1207216327.913618.31738.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 793231 by pino:

Backport: properly escape rich text in html-ish tooltips.

CCBUG: 160306


 M  +4 -1      guiutils.cpp  


--- branches/KDE/4.0/kdegraphics/okular/ui/guiutils.cpp #793230:793231
@@ -10,6 +10,7 @@
 #include "guiutils.h"
 
 // qt/kde includes
+#include <qtextdocument.h>
 #include <kglobal.h>
 #include <kiconloader.h>
 #include <klocale.h>
@@ -100,7 +101,9 @@
 
 QString contentsHtml( const Okular::Annotation * ann )
 {
-    return contents( ann ).replace( "\n", "<br>" );
+    QString text = Qt::escape( contents( ann ) );
+    text.replace( "\n", "<br>" );
+    return text;
 }
 
 QString prettyToolTip( const Okular::Annotation * ann )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic