summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2010-06-14 21:25:07 +0200
committermegabigbug <megabigbug@arrakis.(none)>2010-06-14 21:25:07 +0200
commit59ef9b8c4fe1eda36c1b87d08be81e2062490458 (patch)
tree686d4f590d30861a0f6a62930dc0a65eebf3cca8
parentFix the add bookmark action of the WebView context menu (diff)
downloadrekonq-59ef9b8c4fe1eda36c1b87d08be81e2062490458.tar.xz
escape html in search item: prevent qlabel interpret html if the user type <h1>a</h1> for example.
-rw-r--r--src/urlbar/listitem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index 97cd5cd8..037afb06 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -53,7 +53,7 @@
#include <QMouseEvent>
#include <QWebSettings>
#include <QFile>
-
+#include <QTextDocument>
ListItem::ListItem(const UrlSearchItem &item, QWidget *parent)
: QWidget(parent)
@@ -299,7 +299,7 @@ SearchListItem::SearchListItem(const UrlSearchItem &item, const QString &text, Q
QString SearchListItem::searchItemTitle(QString engine, QString text)
{
- return QString(i18nc("%1=search engine, e.g. Google, Wikipedia %2=text to search for", "Search %1 for <b>%2</b>", engine, text));
+ return QString(i18nc("%1=search engine, e.g. Google, Wikipedia %2=text to search for", "Search %1 for <b>%2</b>", engine, Qt::escape(text)));
}