forked from extern/egroupware
Horde::iCalendar vcalendar export bug
Special characters in text field are not scaped when events or todos are exported. For example, ',' in the description field are send literal. According to rfc2445 section 4.3.11 there are some characters which must be scaped or quoted. This patch tries to solved this problem. patch contributed by Antoni Matamalas
This commit is contained in:
parent
e1d3cec73e
commit
6227931881
@ -692,6 +692,7 @@ class Horde_iCalendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$value = $attribute['value'];
|
$value = $attribute['value'];
|
||||||
|
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
// Date fields.
|
// Date fields.
|
||||||
case 'DTSTAMP':
|
case 'DTSTAMP':
|
||||||
@ -781,6 +782,17 @@ class Horde_iCalendar {
|
|||||||
case 'EXRULE':
|
case 'EXRULE':
|
||||||
case 'RRULE':
|
case 'RRULE':
|
||||||
|
|
||||||
|
//Text Fields
|
||||||
|
case 'SUMMARY':
|
||||||
|
case 'DESCRIPTION':
|
||||||
|
case 'COMMENT':
|
||||||
|
$value = str_replace('\\', '\\\\', $value);
|
||||||
|
$value = str_replace($this->_newline, '\n', $value);
|
||||||
|
$value = str_replace(',', '\,', $value);
|
||||||
|
$value = str_replace(';', '\;', $value);
|
||||||
|
$value = str_replace(':', '\:', $value);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user