aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2004-03-30 01:37:55 +0800
committerRadek Doulik <rodo@src.gnome.org>2004-03-30 01:37:55 +0800
commitd2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b (patch)
treee44db54dfd6015d0d9e9249b7b52784da404b675 /camel
parent724507dfa693bb75c17788619a956b5e858cd216 (diff)
downloadgsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.tar
gsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.tar.gz
gsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.tar.bz2
gsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.tar.lz
gsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.tar.xz
gsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.tar.zst
gsoc2013-evolution-d2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b.zip
close pre tag in case we just flush. I am not sure if it's still worth to
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 svn path=/trunk/; revision=25229
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-mime-filter-tohtml.c18
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;
}