Version: unspecified (using Devel) OS: Linux For example, the CPAN search (kdebase/runtime/kurifilter-plugins/ikws/searchproviders/cpan.desktop). If typed in Konqueror's location bar, "cpan:SEARCH" expands to the URL http://search.cpan.org/search?mode=dist&query=SEARCH and the correct results are returned. However, if this same web shortcut is entered in the Alt+F2 run box, the URL passed to Konqueror is: http://search.cpan.org/search?mode=%5C%7Bmode,2,%22dist%22%7D&query=%5C%7Bquery,q,1%7D It appears that a web shortcut in the runner does not understand anything other than the "\\{@}" substitution. Other web shortcuts (from kdebase) using other than this syntax are: cpan.desktop as above docbook.desktop uses \\{1} google_code.desktop uses \\{%2520} nl-telephone.desktop uses \\{1} and \\{2} Reproducible: Always Expected Results: The search URL and returned results should be the same in both cases.
Aha, just spotted in kdebase/workspace/plasma/generic/runners/webshortcuts/webshortcutrunner.cpp, WebshortcutRunner::searchQuery(const QString &query, const QString &term): // FIXME? currently only basic searches are supported
Would replacing WebshortcutRunner::searchQuery() with the following achieve the required result, without any unwanted side effects? QString WebshortcutRunner::searchQuery(const QString &query, const QString &term) { QString q = term; if (!KUriFilter::self()->filterUri(q, QStringList("kurisearchfilter"))) return (QString()); return (q); }
Submitted review at http://reviewboard.kde.org/r/4490/
SVN commit 1144555 by marten: Use KUriFilter to expand the query, in order to support complex substitutions. BUG:242156 M +5 -10 webshortcutrunner.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1144555
SVN commit 1144562 by marten: Backport of commit 1144555 to trunk: Use KUriFilter to expand the query, in order to support complex substitutions. BUG:242156 M +5 -10 webshortcutrunner.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1144562