[evolution-data-server/gnome-3-16] Bug 747988 - Adding 000D characters in plaintext mail replies



commit 6acb9be1d1b66263dc769a69dc03e66c13d40aae
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 25 12:14:01 2015 +0200

    Bug 747988 - Adding 000D characters in plaintext mail replies

 camel/camel-mime-filter-tohtml.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
index ef9ed68..57d30e9 100644
--- a/camel/camel-mime-filter-tohtml.c
+++ b/camel/camel-mime-filter-tohtml.c
@@ -225,9 +225,14 @@ writeln (CamelMimeFilter *mime_filter,
                        }
                        /* otherwise, FALL THROUGH */
                default:
-                       if (u >= 20 && u <0x80)
+                       if (u == '\r' && inptr >= inend) {
+                               /* This constructs \r\n sequence at the end of the line, thus pass it in
+                                  only if not converting the new-line breaks */
+                               if (!(priv->flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_NL))
+                                       *outptr++ = u;
+                       } else if (u >= 20 && u <0x80) {
                                *outptr++ = u;
-                       else {
+                       } else {
                                if (priv->flags & CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT)
                                        *outptr++ = '?';
                                else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]