diff options
-rw-r--r-- | camel/ChangeLog | 9 | ||||
-rw-r--r-- | camel/camel-mime-filter-tohtml.c | 18 |
2 files changed, 24 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index d8eeab1a19..1878664afa 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2004-03-29 Radek Doulik <rodo@ximian.com> + + * camel-mime-filter-tohtml.c (html_convert): close pre tag in case + we just flush. I am not sure if it's still worth to check for + inlen == 0 and handle it specially, but didn't want to make too + big changes. + + Fixes #55817 + 2004-03-29 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_counts): use diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c index 678d8005f4..9d505e2514 100644 --- a/camel/camel-mime-filter-tohtml.c +++ b/camel/camel-mime-filter-tohtml.c @@ -230,9 +230,21 @@ html_convert (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespace, int depth; if (inlen == 0) { - *out = in; - *outlen = 0; - *outprespace = 0; + if (html->pre_open) { + /* close the pre-tag */ + outend = filter->outbuf + filter->outsize; + outptr = check_size (filter, filter->outbuf, &outend, 10); + outptr = g_stpcpy (outptr, "</pre>"); + html->pre_open = FALSE; + + *out = filter->outbuf; + *outlen = outptr - filter->outbuf; + *outprespace = filter->outpre; + } else { + *out = in; + *outlen = 0; + *outprespace = 0; + } return; } |