diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2008-01-28 18:52:18 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2008-01-28 18:52:18 +0800 |
commit | b78f54d36f3c1846197660769bcbf447c78829e2 (patch) | |
tree | 293e603c0cc788fc144f9cc94e65164f4b6e43ff /mail | |
parent | a999b463a02990600e5af366700eda6f0eef57cf (diff) | |
download | gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.tar gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.tar.gz gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.tar.bz2 gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.tar.lz gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.tar.xz gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.tar.zst gsoc2013-evolution-b78f54d36f3c1846197660769bcbf447c78829e2.zip |
** Fix for bug #506948
2008-01-28 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #506948
* em-folder-view.c: (url_unescape_amp), (emp_uri_popup_link_copy):
Copy the unescaped url
svn path=/trunk/; revision=34918
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-view.c | 33 |
2 files changed, 39 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 7222fb34d4..cbf33205c9 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2008-01-28 Srinivasa Ragavan <sragavan@novell.com> + + ** Fix for bug #506948 + + * em-folder-view.c: (url_unescape_amp), (emp_uri_popup_link_copy): + Copy the unescaped url + 2008-01-28 Milan Crha <mcrha@redhat.com> ** Fix for bug #504062 diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 91a9f3dc82..c932f0fb28 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -2758,6 +2758,37 @@ 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) { @@ -2765,7 +2796,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 = g_strdup(pitem->user_data); + p->selection_uri = 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()); |