aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c16
2 files changed, 16 insertions, 6 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 5447f9676b..81bf1550ef 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-26 Jon Trowbridge <trow@ximian.com>
+
+ * e-msg-composer.c (e_msg_composer_new_from_url): Fixes glitch in
+ mailto: url parsing that caused it to fail when recipient names
+ contained commas. (Bug #10796)
+
2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (save_draft): Update to reflect changes to
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index fc4ca817ce..61ba59b32b 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2763,7 +2763,7 @@ add_recipients (GList *list, const char *recips, gboolean decode)
* defined by the provided URL.
**/
EMsgComposer *
-e_msg_composer_new_from_url (const char *url)
+e_msg_composer_new_from_url (const char *url_in)
{
EMsgComposer *composer;
EMsgComposerHdrs *hdrs;
@@ -2772,20 +2772,24 @@ e_msg_composer_new_from_url (const char *url)
char *subject = NULL, *body = NULL;
const char *p, *header;
int len, clen;
- char *content;
+ char *url, *content;
+
- g_return_val_if_fail (g_strncasecmp (url, "mailto:", 7) == 0, NULL);
+ g_return_val_if_fail (g_strncasecmp (url_in, "mailto:", 7) == 0, NULL);
composer = e_msg_composer_new ();
if (!composer)
return NULL;
+ url = g_strdup (url_in);
+ camel_url_decode (url);
+
/* Parse recipients (everything after ':' until '?' or eos. */
p = url + 7;
- len = strcspn (p, "?,");
+ len = strcspn (p, "?");
if (len) {
content = g_strndup (p, len);
- to = add_recipients (to, content, TRUE);
+ to = add_recipients (to, content, FALSE);
g_free (content);
}
@@ -2806,7 +2810,7 @@ e_msg_composer_new_from_url (const char *url)
clen = strcspn (p, "&");
content = g_strndup (p, clen);
camel_url_decode (content);
-
+
if (!g_strncasecmp (header, "to", len))
to = add_recipients (to, content, FALSE);
else if (!g_strncasecmp (header, "cc", len))