Properly escape rich text in html-ish tooltips.

BUG: 160306

svn path=/trunk/KDE/kdegraphics/okular/; revision=793230
This commit is contained in:
Pino Toscano 2008-04-03 09:52:05 +00:00
parent 3dbe58f03c
commit 146ac422ff

View file

@ -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 contents( const Okular::Annotation * ann )
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 )