|
|
c30b3f |
From 6022b2b7816fea84919eef5993363f636bf734dc Mon Sep 17 00:00:00 2001
|
|
|
c30b3f |
From: Milan Crha <mcrha@redhat.com>
|
|
|
c30b3f |
Date: Mon, 3 Sep 2018 09:43:50 +0200
|
|
|
c30b3f |
Subject: evo-I#86 - Quoting of plain text mail into HTML mode mangles deeper
|
|
|
c30b3f |
levels
|
|
|
c30b3f |
|
|
|
c30b3f |
Related to https://gitlab.gnome.org/GNOME/evolution/issues/86
|
|
|
c30b3f |
|
|
|
c30b3f |
diff --git a/src/camel/camel-mime-filter-tohtml.c b/src/camel/camel-mime-filter-tohtml.c
|
|
|
c30b3f |
index 07024aa1a..df6283655 100644
|
|
|
c30b3f |
--- a/src/camel/camel-mime-filter-tohtml.c
|
|
|
c30b3f |
+++ b/src/camel/camel-mime-filter-tohtml.c
|
|
|
c30b3f |
@@ -303,6 +303,7 @@ html_convert (CamelMimeFilter *mime_filter,
|
|
|
c30b3f |
outend = mime_filter->outbuf + mime_filter->outsize;
|
|
|
c30b3f |
|
|
|
c30b3f |
if (priv->flags & CAMEL_MIME_FILTER_TOHTML_PRE && !priv->pre_open) {
|
|
|
c30b3f |
+ outptr = check_size (mime_filter, outptr, &outend, 6);
|
|
|
c30b3f |
outptr = g_stpcpy (outptr, "");
|
|
|
c30b3f |
priv->pre_open = TRUE;
|
|
|
c30b3f |
}
|
|
|
c30b3f |
@@ -339,13 +340,13 @@ html_convert (CamelMimeFilter *mime_filter,
|
|
|
c30b3f |
|
|
|
c30b3f |
depth = citation_depth (start, inend, &skip);
|
|
|
c30b3f |
while (priv->blockquote_depth < depth) {
|
|
|
c30b3f |
- outptr = check_size (mime_filter, outptr, &outend, 30);
|
|
|
c30b3f |
- outptr = g_stpcpy (outptr, "\n");
|
|
|
c30b3f |
+ outptr = check_size (mime_filter, outptr, &outend, 25);
|
|
|
c30b3f |
+ outptr = g_stpcpy (outptr, "");
|
|
|
c30b3f |
priv->blockquote_depth++;
|
|
|
c30b3f |
}
|
|
|
c30b3f |
while (priv->blockquote_depth > depth) {
|
|
|
c30b3f |
- outptr = check_size (mime_filter, outptr, &outend, 15);
|
|
|
c30b3f |
- outptr = g_stpcpy (outptr, "\n");
|
|
|
c30b3f |
+ outptr = check_size (mime_filter, outptr, &outend, 14);
|
|
|
c30b3f |
+ outptr = g_stpcpy (outptr, "");
|
|
|
c30b3f |
priv->blockquote_depth--;
|
|
|
c30b3f |
}
|
|
|
c30b3f |
#if FOOLISHLY_UNMUNGE_FROM
|
|
|
c30b3f |
@@ -463,14 +464,14 @@ html_convert (CamelMimeFilter *mime_filter,
|
|
|
c30b3f |
outptr, &outend);
|
|
|
c30b3f |
|
|
|
c30b3f |
while (priv->blockquote_depth > 0) {
|
|
|
c30b3f |
- outptr = check_size (mime_filter, outptr, &outend, 15);
|
|
|
c30b3f |
+ outptr = check_size (mime_filter, outptr, &outend, 14);
|
|
|
c30b3f |
outptr = g_stpcpy (outptr, "");
|
|
|
c30b3f |
priv->blockquote_depth--;
|
|
|
c30b3f |
}
|
|
|
c30b3f |
|
|
|
c30b3f |
if (priv->pre_open) {
|
|
|
c30b3f |
/* close the pre-tag */
|
|
|
c30b3f |
- outptr = check_size (mime_filter, outptr, &outend, 10);
|
|
|
c30b3f |
+ outptr = check_size (mime_filter, outptr, &outend, 7);
|
|
|
c30b3f |
outptr = g_stpcpy (outptr, "");
|
|
|
c30b3f |
priv->pre_open = FALSE;
|
|
|
c30b3f |
}
|