X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-text-utils.c;h=fef874cb3d6267d4eb6ff06cb7f893aed837346f;hp=7bceaf0a7c572d8b72f4c0f8a3be61206132eafd;hb=fa4f64debd30776d872d98168cae692e7dd2763d;hpb=6d6bf6cd72cea6ac9c50472e277ab214be598d80 diff --git a/src/modest-text-utils.c b/src/modest-text-utils.c index 7bceaf0..fef874c 100644 --- a/src/modest-text-utils.c +++ b/src/modest-text-utils.c @@ -163,6 +163,8 @@ static gchar* modest_text_utils_quote_html (const gchar *text, GList *attachments, int limit); static gchar* get_email_from_address (const gchar *address); +static void remove_extra_spaces (gchar *string); + /* ******************************************************************* */ @@ -694,6 +696,8 @@ modest_text_utils_split_addresses_list (const gchar *addresses) addr = g_strndup (my_addrs, end - my_addrs); g_strchomp (addr); + remove_extra_spaces (addr); + head = g_slist_append (NULL, addr); head->next = modest_text_utils_split_addresses_list (end); /* recurse */ @@ -1936,6 +1940,20 @@ remove_quotes (gchar **quotes) } } +static void +remove_extra_spaces (gchar *string) +{ + gchar *start; + + start = string; + while (start && start[0] != '\0') { + if ((start[0] == ' ') && (start[1] == ' ')) { + g_strchug (start+1); + } + start++; + } +} + gchar * modest_text_utils_escape_mnemonics (const gchar *text) {