[evolution] Bug 781570 - Replace Unicode NBSP to ASCII space in text/plain before send
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 781570 - Replace Unicode NBSP to ASCII space in text/plain before send
- Date: Fri, 21 Apr 2017 09:18:53 +0000 (UTC)
commit 3796dfaf828aaec01ba7b6f8b69c240285b26a95
Author: Milan Crha <mcrha redhat com>
Date: Fri Apr 21 11:17:25 2017 +0200
Bug 781570 - Replace Unicode NBSP to ASCII space in text/plain before send
.../web-extension/e-editor-dom-functions.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index c9ad343..f73f432 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -7463,6 +7463,16 @@ process_node_to_plain_text_for_exporting (EEditorPage *editor_page,
g_regex_unref (regex);
}
+ if (strstr (content, UNICODE_NBSP)) {
+ gchar *tmp;
+
+ regex = g_regex_new (UNICODE_NBSP, 0, 0, NULL);
+ tmp = g_regex_replace (regex, content, -1, 0, " ", 0, NULL);
+ g_free (content);
+ content = tmp;
+ g_regex_unref (regex);
+ }
+
class = webkit_dom_element_get_class_name (WEBKIT_DOM_ELEMENT (source));
if (class && (css_align = strstr (class, "-x-evo-align-"))) {
gchar *content_with_align;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]