From 424732e1ca97e15597f58a597f666ba9a2ad03d9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 17 Jun 2004 20:27:23 +0000 Subject: Don't foolishly unmunge From_ lines. First off, we don't even know if our 2004-06-17 Jeffrey Stedfast * camel-mime-filter-tohtml.c: Don't foolishly unmunge From_ lines. First off, we don't even know if our input stream came from an mbox file and secondly, the ">From " may have been intentional by the author. We Just Don't Know (tm). svn path=/trunk/; revision=26398 --- camel/ChangeLog | 7 +++++++ camel/camel-mime-filter-tohtml.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index f405aea854..d8e8f92b07 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2004-06-17 Jeffrey Stedfast + + * camel-mime-filter-tohtml.c: Don't foolishly unmunge From_ + lines. First off, we don't even know if our input stream came from + an mbox file and secondly, the ">From " may have been intentional + by the author. We Just Don't Know (tm). + 2004-06-15 Jeffrey Stedfast * providers/imap4/camel-imap4-store.c (imap4_build_folder_info): diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c index 9d505e2514..b2e61e6b26 100644 --- a/camel/camel-mime-filter-tohtml.c +++ b/camel/camel-mime-filter-tohtml.c @@ -42,6 +42,8 @@ #define d(x) +#define FOOLISHLY_UNMUNGE_FROM 0 + #define CONVERT_WEB_URLS CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS #define CONVERT_ADDRSPEC CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES @@ -135,9 +137,11 @@ citation_depth (const char *in) if (*inptr++ != '>') return 0; +#if FOOLISHLY_UNMUNGE_FROM /* check that it isn't an escaped From line */ if (!strncmp (inptr, "From", 4)) return 0; +#endif while (*inptr != '\n') { if (*inptr == ' ') @@ -278,10 +282,13 @@ html_convert (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespace, outptr = check_size (filter, outptr, &outend, 25); outptr += sprintf(outptr, "", (html->colour & 0xffffff)); - } else if (*start == '>') { + } +#if FOOLISHLY_UNMUNGE_FROM + else if (*start == '>') { /* >From line */ start++; } +#endif } else if (html->flags & CAMEL_MIME_FILTER_TOHTML_CITE) { outptr = check_size (filter, outptr, &outend, 6); outptr = g_stpcpy (outptr, "> "); -- cgit v1.2.3