aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-08-17 03:23:41 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-08-17 03:23:41 +0800
commit9333af2f12cdfe27cfa02fdb5e7634b2d310e967 (patch)
treeb5b6c82114e4030fd4433fd2047949cbb438b9b2 /libical/src
parent5810652218e5db7b73d7f814114e4541a8d05779 (diff)
downloadgsoc2013-evolution-9333af2f12cdfe27cfa02fdb5e7634b2d310e967.tar.gz
gsoc2013-evolution-9333af2f12cdfe27cfa02fdb5e7634b2d310e967.tar.zst
gsoc2013-evolution-9333af2f12cdfe27cfa02fdb5e7634b2d310e967.zip
Dequote the same characters that we know how to quote in
2001-08-16 Federico Mena Quintero <federico@ximian.com> * src/libical/icalvalue.c (icalmemory_strdup_and_dequote): Dequote the same characters that we know how to quote in icalvalue_text_as_ical_string(). Fixes Ximian bug #7433. svn path=/trunk/; revision=12115
Diffstat (limited to 'libical/src')
-rw-r--r--libical/src/libical/icalvalue.c40
1 files changed, 28 insertions, 12 deletions
diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c
index 8c5c1303ea..459bebe830 100644
--- a/libical/src/libical/icalvalue.c
+++ b/libical/src/libical/icalvalue.c
@@ -181,18 +181,39 @@ char* icalmemory_strdup_and_dequote(const char* str)
}
case 'n':
+ case 'N':
{
*pout = '\n';
break;
}
- case 'N':
+ case 't':
+ case 'T':
{
- *pout = '\n';
+ *pout = '\t';
+ break;
+ }
+ case 'r':
+ case 'R':
+ {
+ *pout = '\r';
+ break;
+ }
+ case 'b':
+ case 'B':
+ {
+ *pout = '\b';
+ break;
+ }
+ case 'f':
+ case 'F':
+ {
+ *pout = '\f';
break;
}
- case '\\':
- case ',':
case ';':
+ case ',':
+ case '"':
+ case '\\':
{
*pout = *p;
break;
@@ -665,14 +686,9 @@ char* icalvalue_text_as_ical_string(icalvalue* value) {
}
case ';':
- case ',':{
- icalmemory_append_char(&str,&str_p,&buf_sz,'\\');
- icalmemory_append_char(&str,&str_p,&buf_sz,*p);
- line_length+=3;
- break;
- }
-
- case '"':{
+ case ',':
+ case '"':
+ case '\\':{
icalmemory_append_char(&str,&str_p,&buf_sz,'\\');
icalmemory_append_char(&str,&str_p,&buf_sz,*p);
line_length+=3;