[evolution-data-server/gnome-2-28] BUGFIX 474948 (BNC): Expand <group> Inline Adds Control Codes.



commit 5e67cb4b180be3a5b4d4e91f42c912d76bb7a53c
Author: Bharath Acharya <abharath novell com>
Date:   Mon Aug 31 11:08:25 2009 +0530

    BUGFIX 474948 (BNC): Expand <group> Inline Adds Control Codes.
    
    * e-name-selector-entry.c (sanitize_string): Remove all the control
      characters from the headers. Doing this in sanitize string fixes it
      for all cases.
    
    Bug Description:
    If you auto-complete a Groupwise group into the To: field of an email messages,
    you can right-mouse on it and select "Expand <group> Inline".  It should then
    take all of the names and put them into the single line widget.  This works,
    however it also adds control codes as well.

 libedataserverui/e-name-selector-entry.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libedataserverui/e-name-selector-entry.c b/libedataserverui/e-name-selector-entry.c
index c449983..0c77f3b 100644
--- a/libedataserverui/e-name-selector-entry.c
+++ b/libedataserverui/e-name-selector-entry.c
@@ -172,7 +172,7 @@ e_name_selector_entry_class_init (ENameSelectorEntryClass *name_selector_entry_c
 	g_type_class_add_private (object_class, sizeof(ENameSelectorEntryPrivate));
 }
 
-/* Remove unquoted commas from string */
+/* Remove unquoted commas and control characters from string */
 static gchar *
 sanitize_string (const gchar *string)
 {
@@ -192,6 +192,8 @@ sanitize_string (const gchar *string)
 			quoted = ~quoted;
 		else if (c == ',' && !quoted)
 			continue;
+		else if (c == '\t' || c == '\n')
+			continue;
 
 		g_string_append_unichar (gstring, c);
 	}



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