mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
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
630809ee5f
commit
1ba36a6ca5
@ -692,6 +692,7 @@ class Horde_iCalendar {
|
||||
}
|
||||
|
||||
$value = $attribute['value'];
|
||||
|
||||
switch ($name) {
|
||||
// Date fields.
|
||||
case 'DTSTAMP':
|
||||
@ -781,6 +782,17 @@ class Horde_iCalendar {
|
||||
case 'EXRULE':
|
||||
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:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user