aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-07-26 02:46:43 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-07-26 02:46:43 +0800
commit77a394e24d85bbaceed4e5e656d63b07b8f420e3 (patch)
tree0c3a3956953dea4ffec9f91b10d309fcc153360b /libical/src
parent32e9b0c2020c7ed6ef0aac891e811e0547956337 (diff)
downloadgsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.tar
gsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.tar.gz
gsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.tar.bz2
gsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.tar.lz
gsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.tar.xz
gsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.tar.zst
gsoc2013-evolution-77a394e24d85bbaceed4e5e656d63b07b8f420e3.zip
if the property contai
2001-07-25 JP Rosevear <jpr@ximian.com> * src/libical/icalparameter.c (icalparameter_as_ical_string): if the property contai svn path=/trunk/; revision=11405
Diffstat (limited to 'libical/src')
-rw-r--r--libical/src/libical/icalparameter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libical/src/libical/icalparameter.c b/libical/src/libical/icalparameter.c
index 156ecdb04b..7e0d15cef3 100644
--- a/libical/src/libical/icalparameter.c
+++ b/libical/src/libical/icalparameter.c
@@ -245,7 +245,17 @@ icalparameter_as_ical_string (icalparameter* parameter)
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "=");
if(impl->string !=0){
+ int qm = 0;
+
+ /* Encapsulate the property in quotes if necessary */
+ if (strchr (impl->string, ';') != 0 || strchr (impl->string, ':') != 0) {
+ icalmemory_append_char (&buf, &buf_ptr, &buf_size, '"');
+ qm = 1;
+ }
icalmemory_append_string(&buf, &buf_ptr, &buf_size, impl->string);
+ if (qm == 1) {
+ icalmemory_append_char (&buf, &buf_ptr, &buf_size, '"');
+ }
} else if (impl->data != 0){
const char* str = icalparameter_enum_to_string(impl->data);
icalmemory_append_string(&buf, &buf_ptr, &buf_size, str);