]> git.0d.be Git - empathy.git/commitdiff
Use empathy_make_absolute_url to fix URLs that have no scheme
authorPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
Tue, 18 Aug 2009 17:00:57 +0000 (13:00 -0400)
committerPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
Tue, 18 Aug 2009 20:19:14 +0000 (16:19 -0400)
libempathy-gtk/empathy-theme-adium.c

index c5fec06e5b315dfd76dd7e007e26cbc0eeca6cd0..b286464d282b619c004177ba44a4a8958b02f7ef 100644 (file)
@@ -308,6 +308,8 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
 
                string = g_string_sized_new (strlen (text));
                do {
+                       gchar *real_url;
+
                        g_match_info_fetch_pos (match_info, 0, &s, &e);
 
                        if (s > last) {
@@ -317,12 +319,15 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
                        }
 
                        /* Append the link inside <a href=""></a> tag */
+                       real_url = empathy_make_absolute_url (text + s);
+
                        g_string_append (string, "<a href=\"");
-                       g_string_append_len (string, text + s, e - s);
+                       g_string_append (string, real_url);
                        g_string_append (string, "\">");
                        g_string_append_len (string, text + s, e - s);
                        g_string_append (string, "</a>");
 
+                       g_free (real_url);
                        last = e;
                } while (g_match_info_next (match_info, NULL));