aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-15 11:39:43 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-15 11:39:43 +0800
commit2e3a3cf26e4d1894707703b15340529b8874466c (patch)
tree880b18c84f6568e805b161d69a80037b251c766c /mail/em-utils.c
parent7ed2b90bdad0637d72be1815e6634bb352d0ec08 (diff)
downloadgsoc2013-evolution-2e3a3cf26e4d1894707703b15340529b8874466c.tar.gz
gsoc2013-evolution-2e3a3cf26e4d1894707703b15340529b8874466c.tar.zst
gsoc2013-evolution-2e3a3cf26e4d1894707703b15340529b8874466c.zip
Merge revisions 37047:37074 from trunk.
svn path=/branches/kill-bonobo/; revision=37075
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index e31bab0d22..8dbadea15b 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -2473,3 +2473,34 @@ em_utils_show_info_silent (GtkWidget *widget)
widget, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
}
+
+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, "&amp;", 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, "&amp;", 5) == 0)
+ i += 4;
+ }
+ buff [j] = 0;
+
+ return buff;
+}