mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-14 11:53:21 +00:00
Properly escape rich text in html-ish tooltips.
BUG: 160306 svn path=/trunk/KDE/kdegraphics/okular/; revision=793230
This commit is contained in:
parent
3dbe58f03c
commit
146ac422ff
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue