diff --git a/midori/sokoke.c b/midori/sokoke.c index adcddb73..e425b9d2 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -121,7 +121,7 @@ sokoke_magic_uri (const gchar* uri, if (search && search[0] && !g_ascii_isalpha (search[1])) if (!strchr (search, '.')) return g_strconcat ("http://", uri, NULL); - if (!strcmp (uri, "localhost")) + if (!strcmp (uri, "localhost") || g_str_has_prefix (uri, "localhost/")) return g_strconcat ("http://", uri, NULL); parts = g_strsplit (uri, ".", 0); if (!search && parts[0] && parts[1]) diff --git a/tests/magic-uri.c b/tests/magic-uri.c index 3a8dbafa..7fda317a 100644 --- a/tests/magic-uri.c +++ b/tests/magic-uri.c @@ -60,6 +60,7 @@ main (int argc, g_free (b); test_input ("localhost", "http://localhost"); test_input ("localhost:8000", "http://localhost:8000"); + test_input ("localhost/rss", "http://localhost/rss"); test_input ("192.168.1.1", "http://192.168.1.1"); test_input ("192.168.1.1:8000", "http://192.168.1.1:8000"); test_input ("sm midori", SM "midori");