[evolution] If body contains just the empty block, then nothing is sent



commit cbf5bfbb4813b2e798bb8e2f3a7b59cba04b54ad
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Oct 14 08:47:01 2016 +0200

    If body contains just the empty block, then nothing is sent
    
    This is wrong, we have to sent the new line character.

 .../web-extension/e-editor-dom-functions.c         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 0e8da0d..61c8a52 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -7403,7 +7403,7 @@ process_node_to_plain_text_for_exporting (EEditorPage *editor_page,
              WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (source)))
                g_string_append (buffer, "\n");
 
-       if (g_str_has_suffix (buffer->str, "\n") &&
+       if (g_str_has_suffix (buffer->str, "\n") && buffer->len > 1 &&
            WEBKIT_DOM_IS_HTML_BODY_ELEMENT (source))
                g_string_truncate (buffer, buffer->len - 1);
 }


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