]> Pileus Git - ~andy/gtk/commitdiff
GtkAboutDialog: escape mail addresses
authorMatthias Clasen <mclasen@redhat.com>
Fri, 24 Sep 2010 16:02:37 +0000 (12:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 24 Sep 2010 16:02:37 +0000 (12:02 -0400)
This got lost when converting to the ::activate-link signal.

gtk/gtkaboutdialog.c

index 7157b25b3d1f8af4a46fbddda50a22a605a4406b..c1773d388167be6885d0daf6b42f96df29fefbfe 100644 (file)
@@ -2102,9 +2102,17 @@ text_view_new (GtkAboutDialog  *about,
                                                 "underline", PANGO_UNDERLINE_SINGLE,
                                                 NULL);
               if (strcmp (link_type, "email") == 0)
-                 uri = g_strconcat ("mailto:", link, NULL);
+                {
+                  gchar *escaped;
+
+                  escaped = g_uri_escape_string (link, NULL, FALSE);
+                  uri = g_strconcat ("mailto:", escaped, NULL);
+                  g_free (escaped);
+                }
               else
-                 uri = g_strdup (link);
+                {
+                  uri = g_strdup (link);
+                }
               g_object_set_data_full (G_OBJECT (tag), I_("uri"), uri, g_free);
               gtk_text_buffer_insert_with_tags (buffer, &end, link, -1, tag, NULL);