Don't search if there's a colon (:) in a domain

This commit is contained in:
Brandon Mercer 2008-10-16 20:29:58 +02:00 committed by Christian Dywan
parent 7849f28e08
commit 43b1959762

View file

@ -111,7 +111,8 @@ sokoke_magic_uri (const gchar* uri,
if (!strstr (uri, "://"))
{
/* Do we have a domain, ip address or localhost? */
if (strchr (uri, '.') != NULL || !strcmp (uri, "localhost"))
if (strchr (uri, '.') != NULL || strchr (uri, ':')
|| !strcmp (uri, "localhost"))
return g_strconcat ("http://", uri, NULL);
/* We don't want to search? So return early. */
if (!search_engines)