mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-14 20:14:11 +01:00
Fix old format vCard/vCalendar quoting issue
This commit is contained in:
parent
68cf0235e2
commit
ed79fca436
@ -848,13 +848,19 @@ class Horde_iCalendar {
|
||||
// String fields.
|
||||
default:
|
||||
if ($this->isOldFormat()) {
|
||||
$value = trim($value);
|
||||
// vCalendar 1.0 and vCard 2.1 only escape semicolons
|
||||
// and use unescaped semicolons to create lists.
|
||||
$value = trim($value);
|
||||
$value = str_replace(array('\\n', '\\N', '\\;', '\\:'),
|
||||
array("\n", "\n", ';', ':'),
|
||||
$value);
|
||||
|
||||
// Split by unescaped semicolons:
|
||||
$values = preg_split('/(?<!\\\\);/', $value);
|
||||
$value = str_replace('\\;', ';', $value);
|
||||
$values = str_replace('\\;', ';', $values);
|
||||
$value = str_replace('\\,', ',', $value);
|
||||
$values = str_replace('\\,', ',', $values);
|
||||
$this->setAttribute($tag, trim($value), $params, true, $values);
|
||||
} else {
|
||||
$value = trim($value);
|
||||
@ -869,7 +875,6 @@ class Horde_iCalendar {
|
||||
$values = preg_split('/(?<!\\\\),/', $value);
|
||||
$value = str_replace('\\,', ',', $value);
|
||||
$values = str_replace('\\,', ',', $values);
|
||||
|
||||
$this->setAttribute($tag, trim($value), $params, true, $values);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user