[evolution/wip/webkit2] EHTMLEditorView - Don't send the Evolution CSS style element in HEAD with HTML messages



commit c5349b5ed071aaa07806d142c34d57d194236baa
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Mar 24 08:52:24 2015 +0100

    EHTMLEditorView - Don't send the Evolution CSS style element in HEAD with HTML messages

 web-extensions/e-html-editor-view-dom-functions.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/web-extensions/e-html-editor-view-dom-functions.c 
b/web-extensions/e-html-editor-view-dom-functions.c
index e4804d9..c2e9175 100644
--- a/web-extensions/e-html-editor-view-dom-functions.c
+++ b/web-extensions/e-html-editor-view-dom-functions.c
@@ -5681,14 +5681,18 @@ gchar *
 dom_process_content_for_html (WebKitDOMDocument *document,
                               EHTMLEditorWebExtension *extension)
 {
-       WebKitDOMNode *body, *document_clone;
+       WebKitDOMNode *node, *document_clone;
        gchar *html_content;
 
        document_clone = webkit_dom_node_clone_node (
                WEBKIT_DOM_NODE (webkit_dom_document_get_document_element (document)), TRUE);
-       body = WEBKIT_DOM_NODE (webkit_dom_element_query_selector (
+       node = WEBKIT_DOM_NODE (webkit_dom_element_query_selector (
+               WEBKIT_DOM_ELEMENT (document_clone), "style#-x-evo-quote-style", NULL));
+       if (node)
+               remove_node (node);
+       node = WEBKIT_DOM_NODE (webkit_dom_element_query_selector (
                WEBKIT_DOM_ELEMENT (document_clone), "body", NULL));
-       process_elements (extension, body, TRUE, FALSE, FALSE, NULL);
+       process_elements (extension, node, TRUE, FALSE, FALSE, NULL);
 
        html_content = webkit_dom_html_element_get_outer_html (
                WEBKIT_DOM_HTML_ELEMENT (document_clone));


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