diff options
author | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-08-19 01:00:57 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-08-19 04:19:14 +0800 |
commit | 8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11 (patch) | |
tree | 35d6b8761878826b2948747101a93f100ceea348 | |
parent | c5cf2e489ecda8e8f2f53f29120388ba15e635c8 (diff) | |
download | gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.tar gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.tar.gz gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.tar.bz2 gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.tar.lz gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.tar.xz gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.tar.zst gsoc2013-empathy-8b9afe55dba0cb3dc7c20d714574e8c85f9fdb11.zip |
Use empathy_make_absolute_url to fix URLs that have no scheme
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index c5fec06e5..b286464d2 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -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)); |