[evolution/gnome-3-22] If body contains just the empty block, then nothing is sent



commit 39ecab8c2db5da0d6289c486f9a2004dba751388
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Oct 14 09:06:33 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/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 6c90e21..4413d91 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -7405,7 +7405,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]