aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-08-07 17:40:59 +0800
committerTomas Popela <tpopela@redhat.com>2014-08-07 17:40:59 +0800
commitfe3a3c518bf39a4f01c2d4666d9f80708a67fe56 (patch)
tree65f77dfe4f21e85e44500d093fd54a7e73ffe677
parent04d2cb0e4c2819faa8bf9df0286d1654e00825db (diff)
downloadgsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.tar
gsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.tar.gz
gsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.tar.bz2
gsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.tar.lz
gsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.tar.xz
gsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.tar.zst
gsoc2013-evolution-fe3a3c518bf39a4f01c2d4666d9f80708a67fe56.zip
EHTMLEditorView - Process the plain text version the right way when sending the HTML mail
-rw-r--r--e-util/e-html-editor-view.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 886c6fec0d..8b92b3d791 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -6344,7 +6344,8 @@ static gchar *
process_content_for_plain_text (EHTMLEditorView *view)
{
EHTMLEditorSelection *selection;
- gboolean converted, wrap = FALSE, quote = FALSE, clean = FALSE;
+ gboolean wrap = FALSE, quote = FALSE, clean = FALSE;
+ gboolean converted, is_from_new_message;
gint length, ii;
GString *plain_text;
WebKitDOMDocument *document;
@@ -6357,13 +6358,15 @@ process_content_for_plain_text (EHTMLEditorView *view)
body = WEBKIT_DOM_NODE (webkit_dom_document_get_body (document));
converted = webkit_dom_element_has_attribute (
WEBKIT_DOM_ELEMENT (body), "data-converted");
+ is_from_new_message = webkit_dom_element_has_attribute (
+ WEBKIT_DOM_ELEMENT (body), "data-new-message");
source = webkit_dom_node_clone_node (WEBKIT_DOM_NODE (body), TRUE);
selection = e_html_editor_view_get_selection (view);
/* If composer is in HTML mode we have to move the content to plain version */
if (view->priv->html_mode) {
- if (converted) {
+ if (converted || is_from_new_message) {
toggle_paragraphs_style_in_element (
view, WEBKIT_DOM_ELEMENT (source), FALSE);
remove_images_in_element (
@@ -6395,8 +6398,8 @@ process_content_for_plain_text (EHTMLEditorView *view)
paragraph = webkit_dom_node_list_item (paragraphs, ii);
- webkit_dom_element_set_id (
- WEBKIT_DOM_ELEMENT (paragraph), "");
+ webkit_dom_element_remove_attribute (
+ WEBKIT_DOM_ELEMENT (paragraph), "id");
}
g_object_unref (paragraphs);