]> git.0d.be Git - empathy.git/commitdiff
theme_adium_parse_body: escape text between links
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 26 Oct 2009 14:40:37 +0000 (14:40 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 26 Oct 2009 14:56:37 +0000 (14:56 +0000)
libempathy-gtk/empathy-theme-adium.c

index 1fc828fcefe3d0d44935a65f1b462f32f536b48a..fcf95ca026a01f898a49459cea3987fc7dd2c32c 100644 (file)
@@ -226,7 +226,10 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
                        if (s > last) {
                                /* Append the text between last link (or the
                                 * start of the message) and this link */
-                               g_string_append_len (string, text + last, s - last);
+                               gchar *str;
+                               str = g_markup_escape_text (text + last, s - last);
+                               g_string_append (string, str);
+                               g_free (str);
                        }
 
                        /* Append the link inside <a href=""></a> tag */
@@ -244,7 +247,10 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
 
                if (e < (gint) strlen (text)) {
                        /* Append the text after the last link */
-                       g_string_append_len (string, text + e, strlen (text) - e);
+                       gchar *str;
+                       str = g_markup_escape_text (text + e, strlen (text) - e);
+                       g_string_append (string, str);
+                       g_free (str);
                }
 
                g_free (ret);