From: hickert Date: Thu, 22 Mar 2007 14:17:23 +0000 (+0000) Subject: Fixed \ handling- X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5344f47185f5df76c1cd3a99309914f299e20c21;p=gosa.git Fixed \ handling- git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5863 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/sieve/class_sieveElement_Comment.inc b/include/sieve/class_sieveElement_Comment.inc index 7b2e599fe..e8caa157c 100644 --- a/include/sieve/class_sieveElement_Comment.inc +++ b/include/sieve/class_sieveElement_Comment.inc @@ -75,7 +75,7 @@ class sieve_comment $smarty->assign("Comment",$Comment); $smarty->assign("ID",$this->object_id); $object = $smarty->fetch(get_template_path("templates/element_comment.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } } diff --git a/include/sieve/class_sieveElement_Discard.inc b/include/sieve/class_sieveElement_Discard.inc index d152c6f7c..1ee28ad43 100644 --- a/include/sieve/class_sieveElement_Discard.inc +++ b/include/sieve/class_sieveElement_Discard.inc @@ -31,7 +31,7 @@ class sieve_discard $smarty->assign("ID", $this->object_id); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object = $smarty->fetch(get_template_path("templates/element_discard.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } } diff --git a/include/sieve/class_sieveElement_Else_Elsif.inc b/include/sieve/class_sieveElement_Else_Elsif.inc index c101bfad8..c02e12360 100644 --- a/include/sieve/class_sieveElement_Else_Elsif.inc +++ b/include/sieve/class_sieveElement_Else_Elsif.inc @@ -30,7 +30,7 @@ class sieve_else $smarty->assign("ID", $this->object_id); $object_container = $smarty->fetch(get_template_path("templates/object_container_clear.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_else.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } diff --git a/include/sieve/class_sieveElement_Fileinto.inc b/include/sieve/class_sieveElement_Fileinto.inc index a62e8eeaf..80b4c3aac 100644 --- a/include/sieve/class_sieveElement_Fileinto.inc +++ b/include/sieve/class_sieveElement_Fileinto.inc @@ -80,7 +80,7 @@ class sieve_fileinto $smarty->assign("ID", $this->object_id); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_fileinto.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } diff --git a/include/sieve/class_sieveElement_If.inc b/include/sieve/class_sieveElement_If.inc index 3b5bb2a1b..445a42a92 100644 --- a/include/sieve/class_sieveElement_If.inc +++ b/include/sieve/class_sieveElement_If.inc @@ -825,7 +825,7 @@ class sieve_if }else{ $object = $smarty->fetch(get_template_path("templates/element_elsif.tpl",TRUE,dirname(__FILE__))); } - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } @@ -1157,7 +1157,7 @@ class sieve_if $smarty->assign("DisplayAdd",FALSE); $smarty->assign("DisplayDel",TRUE); $str = $smarty->fetch(get_template_path("templates/object_test_container.tpl",TRUE,dirname(__FILE__))); - $ret = preg_replace("/%%OBJECT_CONTENT%%/",$ret,$str); + $ret = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($ret,"\\"),$str); return($ret); } diff --git a/include/sieve/class_sieveElement_Keep.inc b/include/sieve/class_sieveElement_Keep.inc index d1870ba14..3e1d58e1c 100644 --- a/include/sieve/class_sieveElement_Keep.inc +++ b/include/sieve/class_sieveElement_Keep.inc @@ -25,7 +25,7 @@ class sieve_keep $smarty->assign("ID", $this->object_id); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object = $smarty->fetch(get_template_path("templates/element_keep.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/", addcslashes($object,"\\"),$object_container); return($str); } function get_sieve_script_part() diff --git a/include/sieve/class_sieveElement_Redirect.inc b/include/sieve/class_sieveElement_Redirect.inc index 47cea6020..67bc934a1 100644 --- a/include/sieve/class_sieveElement_Redirect.inc +++ b/include/sieve/class_sieveElement_Redirect.inc @@ -60,7 +60,7 @@ class sieve_redirect $smarty->assign("LastErrorCnt" , count($this->check())); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_redirect.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } } diff --git a/include/sieve/class_sieveElement_Reject.inc b/include/sieve/class_sieveElement_Reject.inc index cdb89f9fb..0447c254a 100644 --- a/include/sieve/class_sieveElement_Reject.inc +++ b/include/sieve/class_sieveElement_Reject.inc @@ -70,7 +70,7 @@ class sieve_reject $smarty->assign("Multiline",$Multiline); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_reject.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } } diff --git a/include/sieve/class_sieveElement_Require.inc b/include/sieve/class_sieveElement_Require.inc index ee7f12a2d..535c591e8 100644 --- a/include/sieve/class_sieveElement_Require.inc +++ b/include/sieve/class_sieveElement_Require.inc @@ -92,7 +92,7 @@ class sieve_require $smarty->assign("ID", $this->object_id); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_require.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } } diff --git a/include/sieve/class_sieveElement_Stop.inc b/include/sieve/class_sieveElement_Stop.inc index 915b8d942..9acc72bd9 100644 --- a/include/sieve/class_sieveElement_Stop.inc +++ b/include/sieve/class_sieveElement_Stop.inc @@ -25,7 +25,7 @@ class sieve_stop $smarty->assign("ID", $this->object_id); $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_stop.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } diff --git a/include/sieve/class_sieveElement_Vacation.inc b/include/sieve/class_sieveElement_Vacation.inc index e1306b223..9bb4a41b4 100644 --- a/include/sieve/class_sieveElement_Vacation.inc +++ b/include/sieve/class_sieveElement_Vacation.inc @@ -164,7 +164,7 @@ class sieve_vacation $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__))); $object= $smarty->fetch(get_template_path("templates/element_vacation.tpl",TRUE,dirname(__FILE__))); - $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); + $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container); return($str); } }