aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-21 05:37:16 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-21 05:37:16 +0800
commit4939e31d9370d63e673824100c2b62f74a7d2324 (patch)
tree50042c953965e3eac13cc7ceb0748e48b6b5a772 /mail
parentf6f4b2b48c857b4d08e1f1f85f15e0d1ff55e824 (diff)
downloadgsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.tar
gsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.tar.gz
gsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.tar.bz2
gsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.tar.lz
gsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.tar.xz
gsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.tar.zst
gsoc2013-evolution-4939e31d9370d63e673824100c2b62f74a7d2324.zip
Only get the contents of a mime part if it is marked as "inline". Fixes
2002-05-20 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_get_message_body): Only get the contents of a mime part if it is marked as "inline". Fixes bug #7527. svn path=/trunk/; revision=16957
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-format.c6
-rw-r--r--mail/mail-tools.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9f3919a0d5..d72ede0aea 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2002-05-20 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-format.c (mail_get_message_body): Only get the contents of
+ a mime part if it is marked as "inline". Fixes bug #7527.
+
* mail-display.c (mail_display_render): Fixed the "Overdue:"
string to not contain any HTML tags.
diff --git a/mail/mail-format.c b/mail/mail-format.c
index eb5723da17..f55b217a89 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -2299,8 +2299,8 @@ mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolea
char *
mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cite)
{
- CamelContentType *mime_type;
char *subtext, *old, *div, *text = NULL;
+ CamelContentType *mime_type;
GByteArray *bytes = NULL;
CamelMimePart *subpart;
CamelMultipart *mp;
@@ -2373,6 +2373,10 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
for (i = 0; i < nparts; i++) {
subpart = camel_multipart_get_part (mp, i);
+ /* only add to the body contents if it is marked as "inline" */
+ if (!mail_part_is_inline (subpart))
+ continue;
+
data = camel_medium_get_content_object (CAMEL_MEDIUM (subpart));
subtext = mail_get_message_body (data, want_plain, cite);
if (!subtext)
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index ba1de929dd..44deb4c6ce 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -391,7 +391,7 @@ mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...)
gchar *
mail_tool_forward_message (CamelMimeMessage *message, gboolean quoted)
{
- gchar *title, *body, *ret;
+ char *title, *body, *ret;
body = mail_get_message_body (CAMEL_DATA_WRAPPER (message),
!mail_config_get_send_html (),