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:46:09 +00:00
parent ab9c9d21b6
commit fe3ec75610

View File

@ -315,6 +315,10 @@ abstract class bo_merge
{ {
$replacements = $GLOBALS['egw']->translation->convert($replacements,$GLOBALS['egw']->translation->charset(),$this->contacts->prefs['csv_charset']); $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); $content = str_replace(array_keys($replacements),array_values($replacements),$content);
if (strpos($content,'$$IF')) if (strpos($content,'$$IF'))
{ //Example use to use: $$IF n_prefix~Herr~Sehr geehrter~Sehr geehrte$$ { //Example use to use: $$IF n_prefix~Herr~Sehr geehrter~Sehr geehrte$$