[evolution] Remove the zero width space characters from the HTML output



commit 1468ab95bc54aed42a1ec52753d96c172e5ccb71
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Aug 17 17:11:44 2016 +0200

    Remove the zero width space characters from the HTML output

 .../web-extension/e-editor-dom-functions.c         |    7 +++++++
 1 files changed, 7 insertions(+), 0 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 823436d..e7065bf 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -8126,6 +8126,13 @@ e_editor_dom_process_content_to_html_for_exporting (EEditorPage *editor_page)
        html_content = webkit_dom_element_get_outer_html (
                WEBKIT_DOM_ELEMENT (document_clone));
 
+       if (strstr (html_content, UNICODE_ZERO_WIDTH_SPACE)) {
+               GString *processed;
+
+               processed = e_str_replace_string (html_content, UNICODE_ZERO_WIDTH_SPACE, "");
+               g_free (html_content);
+               html_content = g_string_free (processed, FALSE);
+       }
 
        return html_content;
 }


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