[evolution/gnome-3-16] EHTMLEditorView - Inserting space after the link appends it to the link



commit 42eaf1370269c10eeb83b54b93ac2fa01e0d5f08
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jul 10 11:33:44 2015 +0200

    EHTMLEditorView - Inserting space after the link appends it to the link
    
    Check if the text that we are appending doesn't start with non-breaking space.

 e-util/e-html-editor-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 31d7638..9f693d4 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -1630,7 +1630,8 @@ html_editor_view_check_magic_links (EHTMLEditorView *view,
                        text_to_append = webkit_dom_node_get_text_content (node);
                        if (text_to_append && *text_to_append &&
                            !strstr (text_to_append, " ") &&
-                           !strchr (URL_INVALID_TRAILING_CHARS, *text_to_append)) {
+                           !strchr (URL_INVALID_TRAILING_CHARS, *text_to_append) &&
+                           !g_str_has_prefix (text_to_append, UNICODE_NBSP)) {
 
                                appending_to_link = TRUE;
                                parent = WEBKIT_DOM_ELEMENT (prev_sibling);


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