aboutsummaryrefslogtreecommitdiff
path: root/libsylph/utils.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-03-30 09:41:13 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-03-30 09:41:13 +0000
commite362a8bd4f3fe6415a6feaba2a67715c3615e68b (patch)
tree870c9a07b27ad9385688f7694e593dd3aa352cd4 /libsylph/utils.c
parent75fe2bf35e4a37e59845d6ba0cc2f70352f56e5c (diff)
supported In-Reply-To header in mailto URL.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1586 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/utils.c')
-rw-r--r--libsylph/utils.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 85758fe3..c80809fb 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1725,7 +1725,7 @@ gchar *uriencode_for_filename(const gchar *filename)
}
gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
- gchar **subject, gchar **body)
+ gchar **subject, gchar **inreplyto, gchar **body)
{
gchar *tmp_mailto;
gchar *p;
@@ -1741,8 +1741,10 @@ gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
p++;
}
- if (to && !*to)
- *to = g_strdup(tmp_mailto);
+ if (to && !*to) {
+ *to = g_malloc(strlen(tmp_mailto) + 1);
+ decode_uri(*to, tmp_mailto);
+ }
while (p) {
gchar *field, *value;
@@ -1765,13 +1767,19 @@ gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
if (*value == '\0') continue;
if (cc && !*cc && !g_ascii_strcasecmp(field, "cc")) {
- *cc = g_strdup(value);
+ *cc = g_malloc(strlen(value) + 1);
+ decode_uri(*cc, value);
} else if (bcc && !*bcc && !g_ascii_strcasecmp(field, "bcc")) {
- *bcc = g_strdup(value);
+ *bcc = g_malloc(strlen(value) + 1);
+ decode_uri(*bcc, value);
} else if (subject && !*subject &&
!g_ascii_strcasecmp(field, "subject")) {
*subject = g_malloc(strlen(value) + 1);
decode_uri(*subject, value);
+ } else if (inreplyto && !*inreplyto &&
+ !g_ascii_strcasecmp(field, "in-reply-to")) {
+ *inreplyto = g_malloc(strlen(value) + 1);
+ decode_uri(*inreplyto, value);
} else if (body && !*body &&
!g_ascii_strcasecmp(field, "body")) {
*body = g_malloc(strlen(value) + 1);