summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/urlbar/listitem.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index 0df080ae..99b2423d 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -212,12 +212,11 @@ TextLabel::TextLabel(const QString &text, const QString &textToPointOut, QWidget
const bool wasItalic = t.startsWith("<i>");
if (wasItalic)
t.remove(QRegExp("<[/ib]*>"));
+
t = Qt::escape(t);
- QStringList words = textToPointOut.split(" ");
- foreach (const QString &wordToPointOut, words) {
- if (!wordToPointOut.isEmpty())
- t.replace(QRegExp('(' + wordToPointOut + ')', Qt::CaseInsensitive), "<b>\\1</b>");
- }
+ QString ss = Qt::escape(textToPointOut);
+ t.replace(QRegExp('(' + ss + ')', Qt::CaseInsensitive), "<b>\\1</b>");
+
if (wasItalic)
t = QL1S("<i>") + t + QL1S("</i>");
@@ -318,7 +317,7 @@ QString SearchListItem::text()
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 %2", engine, Qt::escape(text)));
+ return QString(i18nc("%1=search engine, e.g. Google, Wikipedia %2=text to search for", "Search %1 for %2", engine, text));
}