[evolution] Bug 751043 - Autogenerated signature: Newline lost in plain text mode



commit a4f8ec22733e20a76ff659de5d58e168eb76291b
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jun 19 08:47:44 2015 +0200

    Bug 751043 - Autogenerated signature: Newline lost in plain text mode

 composer/e-composer-private.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 7e50b3b..515de09 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1109,22 +1109,19 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
        if (is_html && !html_mode) {
                WebKitDOMElement *element;
                gchar *inner_text;
-               gchar *html;
 
                element = webkit_dom_document_create_element (document, "div", NULL);
                webkit_dom_html_element_set_inner_html (
                        WEBKIT_DOM_HTML_ELEMENT (element), contents, NULL);
                inner_text = webkit_dom_html_element_get_inner_text (
                        WEBKIT_DOM_HTML_ELEMENT (element));
-               html = camel_text_to_html (inner_text, 0, 0);
-               if (html) {
-                       g_free (contents);
 
-                       contents = html;
-                       length = strlen (contents);
-               }
-               g_free (inner_text);
-       } else if (!is_html) {
+               g_free (contents);
+               contents = inner_text ? g_strstrip (inner_text) : g_strdup ("");
+               is_html = FALSE;
+       }
+
+       if (!is_html) {
                gchar *html;
 
                html = camel_text_to_html (contents, 0, 0);


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