evolution-data-server r8519 - in trunk/addressbook: . libebook



Author: mcrha
Date: Fri Feb 22 10:30:23 2008
New Revision: 8519
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8519&view=rev

Log:
2008-02-22  Milan Crha  <mcrha redhat com>

	** Part of fix for bug #489043

	* libebook/e-vcard.c: (e_vcard_to_string_vcard_30):
	Do not store quotes in param values when quoting, it is not allowed.



Modified:
   trunk/addressbook/ChangeLog
   trunk/addressbook/libebook/e-vcard.c

Modified: trunk/addressbook/libebook/e-vcard.c
==============================================================================
--- trunk/addressbook/libebook/e-vcard.c	(original)
+++ trunk/addressbook/libebook/e-vcard.c	Fri Feb 22 10:30:23 2008
@@ -850,11 +850,24 @@
 						}
 						pval = g_utf8_next_char (pval);
 					}
-					if (quotes)
+
+					if (quotes) {
+						int i;
+
 						g_string_append_c (attr_str, '"');
-					g_string_append (attr_str, value);
-					if (quotes)
+
+						for (i = 0; value [i]; i++) {
+							/* skip quotes in quoted string; it is not allowed */
+							if (value [i] == '\"')
+								continue;
+
+							g_string_append_c (attr_str, value [i]);
+						}
+
 						g_string_append_c (attr_str, '"');
+					} else
+						g_string_append (attr_str, value);
+
 					if (v->next)
 						g_string_append_c (attr_str, ',');
 				}



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