From 8b32dcadba4c705af60b1e33b24f46d97f7181d6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 1 May 2009 22:16:21 -0400 Subject: =?UTF-8?q?Bug=20581032=20=E2=80=93=20Some=20links=20can't=20be=20?= =?UTF-8?q?opened?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- e-util/e-util.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'e-util/e-util.c') diff --git a/e-util/e-util.c b/e-util/e-util.c index c012b267d5..fc4f71f187 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -40,6 +40,8 @@ #include #include +#include + #ifdef G_OS_WIN32 #include #endif @@ -108,6 +110,7 @@ e_show_uri (GtkWindow *parent, GtkWidget *dialog; GdkScreen *screen = NULL; GError *error = NULL; + gchar *decoded_uri; guint32 timestamp; g_return_if_fail (uri != NULL); @@ -117,8 +120,11 @@ e_show_uri (GtkWindow *parent, if (parent != NULL) screen = gtk_widget_get_screen (GTK_WIDGET (parent)); - if (gtk_show_uri (screen, uri, timestamp, &error)) - return; + decoded_uri = g_strdup (uri); + camel_url_decode (decoded_uri); + + if (gtk_show_uri (screen, decoded_uri, timestamp, &error)) + goto exit; dialog = gtk_message_dialog_new_with_markup ( parent, GTK_DIALOG_DESTROY_WITH_PARENT, @@ -133,6 +139,9 @@ e_show_uri (GtkWindow *parent, gtk_widget_destroy (dialog); g_error_free (error); + +exit: + g_free (decoded_uri); } /** -- cgit v1.2.3