diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-11-26 17:16:39 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-11-26 17:16:39 +0800 |
commit | 02ca446606c2c9f2673188b811891dd107c21e19 (patch) | |
tree | 81a07c88e6a9cbe58dbcb92c5201761ef710965e | |
parent | 12924ec3e9b06460c5ec6ccb5e84a58ab64cd762 (diff) | |
download | gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.tar gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.tar.gz gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.tar.bz2 gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.tar.lz gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.tar.xz gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.tar.zst gsoc2013-empathy-02ca446606c2c9f2673188b811891dd107c21e19.zip |
Clean how we insert link in adium themes
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 2e88ec1dd..f1979a6c7 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -228,22 +228,20 @@ theme_adium_replace_link (const gchar *text, { GString *string = user_data; gchar *real_url; - gchar *str; + gchar *escaped; - /* Append the link inside <a href=""></a> tag */ real_url = empathy_make_absolute_url_len (text, len); - g_string_append_printf (string, "<a href=\"%s\">", real_url); - /* The thing we are making a link of may contain * characters which need escaping */ - str = g_markup_escape_text (text, len); - g_string_append (string, str); - g_free (str); + escaped = g_markup_escape_text (text, len); - g_string_append (string, "</a>"); + /* Append the link inside <a href=""></a> tag */ + g_string_append_printf (string, "<a href=\"%s\">%s</a>", + real_url, escaped); g_free (real_url); + g_free (escaped); } static gboolean use_smileys = FALSE; |