aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-embed-utils.c')
-rw-r--r--embed/ephy-embed-utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index a5c77a782..0405de744 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -95,3 +95,18 @@ ephy_embed_utils_address_has_web_scheme (const char *address)
return has_web_scheme;
}
+
+char*
+ephy_embed_utils_normalize_address (const char *address)
+{
+ char *effective_address;
+
+ g_return_val_if_fail (address, NULL);
+
+ if (ephy_embed_utils_address_has_web_scheme (address) == FALSE)
+ effective_address = g_strconcat ("http://", address, NULL);
+ else
+ effective_address = g_strdup (address);
+
+ return effective_address;
+}