aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 6b02b1a92..ae3675145 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1294,13 +1294,17 @@ empathy_get_toplevel_window (GtkWidget *widget)
static gchar *
fixup_url (const gchar *url)
{
- if (!g_str_has_prefix (url, "ghelp:") &&
- !strstr (url, ":/") &&
- !strstr (url, "@")) {
- return g_strdup_printf ("http://%s", url);
- } else {
+ if (g_str_has_prefix (url, "ghelp:") ||
+ g_str_has_prefix (url, "mailto:") ||
+ strstr (url, ":/")) {
return NULL;
}
+
+ if (strstr (url, "@")) {
+ return g_strdup_printf ("mailto:%s", url);
+ }
+
+ return g_strdup_printf ("http://%s", url);
}
void