1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

[Fix] Fixed searching strings with & character.

This commit is contained in:
nowrep 2012-01-21 00:20:30 +01:00
parent b47c91db5f
commit 647487fcdb

View File

@ -92,18 +92,14 @@ QUrl SearchEnginesManager::searchUrl(const Engine &engine, const QString &string
{ {
ENSURE_LOADED; ENSURE_LOADED;
QString url = engine.url; QByteArray url = engine.url.toUtf8();
url.replace("%s", string); url.replace("%s", QUrl::toPercentEncoding(string));
return QUrl(url); return QUrl::fromEncoded(url);
} }
QUrl SearchEnginesManager::searchUrl(const QString &string) QUrl SearchEnginesManager::searchUrl(const QString &string)
{ {
ENSURE_LOADED; return searchUrl(m_activeEngine, string);
QString url = m_activeEngine.url;
url.replace("%s", string);
return QUrl(url);
} }
void SearchEnginesManager::restoreDefaults() void SearchEnginesManager::restoreDefaults()