Blob Blame History Raw
diff -up evolution-data-server-3.12.11/camel/camel-mime-filter-tohtml.c.camel-tohtml-extra-cr evolution-data-server-3.12.11/camel/camel-mime-filter-tohtml.c
--- evolution-data-server-3.12.11/camel/camel-mime-filter-tohtml.c.camel-tohtml-extra-cr	2014-09-01 10:07:00.000000000 +0200
+++ evolution-data-server-3.12.11/camel/camel-mime-filter-tohtml.c	2015-05-26 14:52:34.607271983 +0200
@@ -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