From 84aa765a197eacbb8e09fc0af2e1e00937ae6178 Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Tue, 13 Jan 2009 03:41:19 +0000 Subject: Patch from Felix Riemann ** Fix for bug #563867 (Unescape "&" when passing the link to browsers). svn path=/trunk/; revision=37063 --- mail/em-folder-view.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'mail/em-folder-view.c') diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 301f612193..c9b05344fc 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -2734,37 +2734,6 @@ emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderVie } } -static gchar * -url_unescape_amp (const gchar *url) -{ - gchar *buff; - int i, j, amps; - - if (!url) - return NULL; - - amps = 0; - for (i = 0; url [i]; i++) { - if (url [i] == '&' && strncmp (url + i, "&", 5) == 0) - amps++; - } - - buff = g_strdup (url); - - if (!amps) - return buff; - - for (i = 0, j = 0; url [i]; i++, j++) { - buff [j] = url [i]; - - if (url [i] == '&' && strncmp (url + i, "&", 5) == 0) - i += 4; - } - buff [j] = 0; - - return buff; -} - static void emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) { @@ -2772,7 +2741,7 @@ emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) struct _EMFolderViewPrivate *p = emfv->priv; g_free(p->selection_uri); - p->selection_uri = url_unescape_amp(pitem->user_data); + p->selection_uri = em_utils_url_unescape_amp(pitem->user_data); gtk_selection_owner_set(p->invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time()); gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time()); -- cgit v1.2.3