mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 14:58:43 +01:00
Command processing needs to do escaping for XML too
This commit is contained in:
parent
70c105d2ec
commit
9b072a81a7
@ -665,6 +665,20 @@ abstract class bo_merge
|
|||||||
if (array_key_exists('$$'.$param[4].'$$',$this->replacements)) $param[4] = $this->replacements['$$'.$param[4].'$$'];
|
if (array_key_exists('$$'.$param[4].'$$',$this->replacements)) $param[4] = $this->replacements['$$'.$param[4].'$$'];
|
||||||
if (array_key_exists('$$'.$param[3].'$$',$this->replacements)) $param[3] = $this->replacements['$$'.$param[3].'$$'];
|
if (array_key_exists('$$'.$param[3].'$$',$this->replacements)) $param[3] = $this->replacements['$$'.$param[3].'$$'];
|
||||||
$replace = preg_match('/'.$param[2].'/',$this->replacements['$$'.$param[1].'$$']) ? $param[3] : $param[4];
|
$replace = preg_match('/'.$param[2].'/',$this->replacements['$$'.$param[1].'$$']) ? $param[3] : $param[4];
|
||||||
|
switch($this->mimetype)
|
||||||
|
{
|
||||||
|
case 'application/vnd.oasis.opendocument.text': // open office
|
||||||
|
case 'application/vnd.oasis.opendocument.spreadsheet':
|
||||||
|
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': // ms office 2007
|
||||||
|
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
||||||
|
case 'application/xml':
|
||||||
|
case 'text/xml':
|
||||||
|
case 'text/html':
|
||||||
|
$is_xml = true;
|
||||||
|
$charset = 'utf-8'; // xml files --> always use utf-8
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch($this->mimetype)
|
switch($this->mimetype)
|
||||||
{
|
{
|
||||||
case 'application/rtf':
|
case 'application/rtf':
|
||||||
@ -688,7 +702,9 @@ abstract class bo_merge
|
|||||||
default:
|
default:
|
||||||
$LF = "\n";
|
$LF = "\n";
|
||||||
}
|
}
|
||||||
|
if($is_xml) {
|
||||||
|
$this->replacements = str_replace(array('&','<','>',"\r","\n"),array('&','<','>','',$LF),$this->replacements);
|
||||||
|
}
|
||||||
if (strpos($param[0],'$$NELF') === 0)
|
if (strpos($param[0],'$$NELF') === 0)
|
||||||
{ //sets a Pagebreak and value, only if the field has a value
|
{ //sets a Pagebreak and value, only if the field has a value
|
||||||
if ($this->replacements['$$'.$param[1].'$$'] !='') $replace = $LF.$this->replacements['$$'.$param[1].'$$'];
|
if ($this->replacements['$$'.$param[1].'$$'] !='') $replace = $LF.$this->replacements['$$'.$param[1].'$$'];
|
||||||
|
Loading…
Reference in New Issue
Block a user