From fe3ec75610862f2706d35e78953be210e3f8e0ac Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 7 Oct 2009 17:46:09 +0000 Subject: [PATCH] zip'ed xml document (eg. OO) --> need to encode &,<,> to not mess up xml --- etemplate/inc/class.bo_merge.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 099282bab4..b2d0e16123 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -315,6 +315,10 @@ abstract class 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('&','&','<','>'),array('&','&','<','>'),$replacements); + } $content = str_replace(array_keys($replacements),array_values($replacements),$content); if (strpos($content,'$$IF')) { //Example use to use: $$IF n_prefix~Herr~Sehr geehrter~Sehr geehrte$$