[gtk+] GtkAboutDialog: escape mail addresses



commit 26c93dc04bd53e2b99eb5dcbc28ead2a14677283
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Sep 24 12:02:37 2010 -0400

    GtkAboutDialog: escape mail addresses
    
    This got lost when converting to the ::activate-link signal.

 gtk/gtkaboutdialog.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 7157b25..c1773d3 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]