diff options
author | Suman Manjunath <msuman@src.gnome.org> | 2009-01-13 11:41:19 +0800 |
---|---|---|
committer | Suman Manjunath <msuman@src.gnome.org> | 2009-01-13 11:41:19 +0800 |
commit | 84aa765a197eacbb8e09fc0af2e1e00937ae6178 (patch) | |
tree | 22518ef0a77615fac5bbe695b2443f77fe69b8ae /mail/em-utils.c | |
parent | 1df00c7d517794881faefd45b3ae230a6b0d8204 (diff) | |
download | gsoc2013-evolution-84aa765a197eacbb8e09fc0af2e1e00937ae6178.tar.gz gsoc2013-evolution-84aa765a197eacbb8e09fc0af2e1e00937ae6178.tar.zst gsoc2013-evolution-84aa765a197eacbb8e09fc0af2e1e00937ae6178.zip |
Patch from Felix Riemann <friemann@svn.gnome.org> ** Fix for bug #563867 (Unescape "&" when passing the link to browsers).
svn path=/trunk/; revision=37063
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r-- | mail/em-utils.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index bb92d7ad03..f65edb0e40 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -2442,3 +2442,34 @@ em_utils_show_info_silent (GtkWidget *widget) g_signal_connect(widget, "response", G_CALLBACK(error_response), NULL); e_activity_handler_make_error (handler, "mail", E_LOG_WARNINGS, widget); } + +gchar * +em_utils_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; +} |