diff options
Diffstat (limited to 'embed/ephy-embed-utils.c')
-rw-r--r-- | embed/ephy-embed-utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c index 5bd5ea79d..5acef0baa 100644 --- a/embed/ephy-embed-utils.c +++ b/embed/ephy-embed-utils.c @@ -107,10 +107,13 @@ char* ephy_embed_utils_normalize_address (const char *address) { char *effective_address = NULL; + char *scheme = NULL; g_return_val_if_fail (address, NULL); - if (ephy_embed_utils_address_has_web_scheme (address) == FALSE) + scheme = g_uri_parse_scheme (address); + + if (scheme == NULL) effective_address = g_strconcat ("http://", address, NULL); else { /* Convert about: schemes to ephy-about: in order to @@ -125,6 +128,8 @@ ephy_embed_utils_normalize_address (const char *address) effective_address = g_strdup (address); } + g_free (scheme); + return effective_address; } |