Allow DuckDuckGo to distinguish Midori

Users who customize the search engine
won't be affected by this.
This commit is contained in:
Christian Dywan 2012-02-21 21:47:56 +01:00
parent ffb86ce7ff
commit 5176b38120

View file

@ -85,6 +85,9 @@ namespace Midori {
if (uri == null)
return keywords;
string escaped = GLib.Uri.escape_string (keywords, ":/", true);
/* Allow DuckDuckGo to distinguish Midori and in turn share revenue */
if (uri == "https://duckduckgo.com/?q=%s")
return "https://duckduckgo.com/?q=%s&t=midori".printf (escaped);
if (uri.str ("%s") != null)
return uri.printf (escaped);
return uri + escaped;