[evolution] EHTMLEditorView - Fix quoting of the lines with anchors



commit 784c8fdc06b5d9204139cde8bb3bbb93832cdba2
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Jun 30 14:33:38 2014 +0200

    EHTMLEditorView - Fix quoting of the lines with anchors
    
    Remove bogus new line character insertion and don't quote the anchor
    element if it has caret/selection inside.

 e-util/e-html-editor-view.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 56ec293..5ca0dc0 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -2794,11 +2794,6 @@ quote_node (WebKitDOMDocument *document,
        if (quote_level == 1 && next_sibling && WEBKIT_DOM_IS_HTML_PRE_ELEMENT (next_sibling))
                return;
 
-       if (next_sibling && WEBKIT_DOM_IS_HTMLBR_ELEMENT (next_sibling) &&
-           WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (webkit_dom_node_get_next_sibling (next_sibling))) {
-               insert_newline = TRUE;
-       }
-
        /* Do temporary wrapper */
        wrapper = webkit_dom_document_create_element (document, "SPAN", NULL);
        webkit_dom_element_set_class_name (wrapper, "-x-evo-temp-text-wrapper");
@@ -2961,8 +2956,10 @@ quote_plain_text_recursive (WebKitDOMDocument *document,
                        goto next_node;
                }
 
-               if (webkit_dom_element_get_child_element_count (WEBKIT_DOM_ELEMENT (node)) != 0)
-                       goto with_children;
+               if (!WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (node))
+                       if (webkit_dom_element_get_child_element_count (
+                               WEBKIT_DOM_ELEMENT (node)) != 0)
+                               goto with_children;
 
                /* Even in plain text mode we can have some basic html element
                 * like anchor and others. When Forwaring e-mail as Quoted EMFormat


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