diff --git a/midori/main.c b/midori/main.c index deda05fa..7345dcb4 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1513,9 +1513,7 @@ midori_prepare_uri (const gchar *uri) { gchar* uri_ready; - if (g_path_is_absolute (uri)) - return g_filename_to_uri (uri, NULL, NULL); - else if (g_str_has_prefix(uri, "javascript:")) + if (g_str_has_prefix(uri, "javascript:")) return NULL; else if (g_file_test (uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { diff --git a/midori/sokoke.c b/midori/sokoke.c index 23a97b1d..b25a3dd0 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -651,7 +651,7 @@ sokoke_magic_uri (const gchar* uri) /* Add file:// if we have a local path */ if (g_path_is_absolute (uri)) - return g_strconcat ("file://", uri, NULL); + return g_filename_to_uri (uri, NULL, NULL); /* Parse geo URI geo:48.202778,16.368472;crs=wgs84;u=40 as a location */ if (!strncmp (uri, "geo:", 4)) {