diff --git a/midori/sokoke.c b/midori/sokoke.c index c65918bd..6654eedc 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -363,11 +363,11 @@ sokoke_magic_uri (const gchar* uri, search_uri = NULL; /* Do we have a keyword and a string? */ parts = g_strsplit (uri, " ", 2); - if (parts[0] && parts[1]) + if (parts[0]) if ((item = katze_array_find_token (search_engines, parts[0]))) { search_uri = katze_item_get_uri (item); - search = sokoke_search_uri (search_uri, parts[1]); + search = sokoke_search_uri (search_uri, parts[1] ? parts[1] : ""); } g_strfreev (parts); return search; diff --git a/tests/magic-uri.c b/tests/magic-uri.c index 10f45e8f..a771786d 100644 --- a/tests/magic-uri.c +++ b/tests/magic-uri.c @@ -141,6 +141,7 @@ magic_uri_search (void) test_input ("max@mustermann.de", NULL); test_input ("g max@mustermann.de", NULL); test_input ("g inurl:http://twotoasts.de bug", NULL); + test_input ("sm", SM); } static void