[evolution/gnome-3-18] EHTMLEditorView - Some of the Evolution's composer attributes are sent in HTML messages



commit a5a57a1b04d2a0d7c3edae9c3a8d0e615f065973
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Feb 3 12:58:06 2016 +0100

    EHTMLEditorView - Some of the Evolution's composer attributes are sent in HTML messages

 e-util/e-html-editor-view.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 699f10f..70d3679 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -2344,12 +2344,11 @@ html_editor_view_set_links_active (EHTMLEditorView *view,
 
        document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view));
 
-       if (active) {
-               style = webkit_dom_document_get_element_by_id (
-                               document, "-x-evo-style-a");
-               if (style)
-                       remove_node (WEBKIT_DOM_NODE (style));
-       } else {
+       style = webkit_dom_document_get_element_by_id (document, "-x-evo-style-a");
+       if (style)
+               remove_node (WEBKIT_DOM_NODE (style));
+
+       if (!active) {
                WebKitDOMHTMLHeadElement *head;
                head = webkit_dom_document_get_head (document);
 
@@ -9362,6 +9361,7 @@ remove_evolution_attributes (WebKitDOMElement *element)
        webkit_dom_element_remove_attribute (element, "data-new-message");
        webkit_dom_element_remove_attribute (element, "data-user-wrapped");
        webkit_dom_element_remove_attribute (element, "data-evo-plain-text");
+       webkit_dom_element_remove_attribute (element, "data-style");
        webkit_dom_element_remove_attribute (element, "spellcheck");
 }
 
@@ -9654,6 +9654,8 @@ process_elements (EHTMLEditorView *view,
 
                        if (!to_plain_text) {
                                remove_base_attributes (
+                                       WEBKIT_DOM_ELEMENT (child));
+                               remove_base_attributes (
                                        WEBKIT_DOM_ELEMENT (first_child));
                                remove_evolution_attributes (
                                        WEBKIT_DOM_ELEMENT (first_child));


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