zip'ed xml document (eg. OO) --> need to encode &,<,> to not mess up xml

This commit is contained in:
Ralf Becker 2009-10-07 17:50:50 +00:00
parent fe212f2d95
commit 1a4b306c46

View File

@ -328,6 +328,10 @@ class addressbook_merge // extends bo_merge
{
$replacements = $GLOBALS['egw']->translation->convert($replacements,$GLOBALS['egw']->translation->charset(),$this->contacts->prefs['csv_charset']);
}
if (substr($document,0,6) == 'zip://') // zip'ed xml document (eg. OO) --> need to encode &,<,> to not mess up xml
{
$replacements = str_replace(array('&amp;','&','<','>'),array('&amp;','&amp;','&lt;','&gt;'),$replacements);
}
$content = str_replace(array_keys($replacements),array_values($replacements),$content);
if (strpos($content,'$$calendar/') !== null) // remove not existing event-replacements