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])
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");