From fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50 Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sun, 6 Jan 2008 22:48:18 +0000 Subject: ** Fix bug #497914 * em-mailer-prefs.c: (emmp_header_is_valid): backport changes from the copy/pasted code in imap-headers plugin. svn path=/trunk/; revision=34772 --- mail/ChangeLog | 8 ++++++++ mail/em-mailer-prefs.c | 12 ++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 06746ba2e4..e9c6868c0a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2007-11-18 Gilles Dartiguelongue + + ** Fix bug #497914 + + * em-mailer-prefs.c: (emmp_header_is_valid): + backport changes from the copy/pasted code in imap-headers + plugin. + 2008-01-06 Michael Monreal ** Fix for bug #492188 diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 991c684d10..5a29b54456 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -462,17 +462,13 @@ emmp_header_remove_sensitivity (EMMailerPrefs *prefs) static gboolean emmp_header_is_valid (const char *header) { - const char *p = header; + gint len = g_utf8_strlen (header, -1); - if (header[0] == 0) + if (header[0] == 0 + || g_utf8_strchr (header, len, ':') != NULL + || g_utf8_strchr (header, len, ' ') != NULL) return FALSE; - while (*p) { - if ((*p == ':') || (*p == ' ')) - return FALSE; - p++; - } - return TRUE; } -- cgit v1.2.3