Code

Fixed \ handling-
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 22 Mar 2007 14:17:23 +0000 (14:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 22 Mar 2007 14:17:23 +0000 (14:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5863 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveElement_Comment.inc
include/sieve/class_sieveElement_Discard.inc
include/sieve/class_sieveElement_Else_Elsif.inc
include/sieve/class_sieveElement_Fileinto.inc
include/sieve/class_sieveElement_If.inc
include/sieve/class_sieveElement_Keep.inc
include/sieve/class_sieveElement_Redirect.inc
include/sieve/class_sieveElement_Reject.inc
include/sieve/class_sieveElement_Require.inc
include/sieve/class_sieveElement_Stop.inc
include/sieve/class_sieveElement_Vacation.inc

index 7b2e599fe8df75248340eec2abb0a5a0286427cb..e8caa157ca64ec0c812864e80bfefb046c663470 100644 (file)
@@ -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);
   }
 }
index d152c6f7ce712b77ad793c049804da636f660e1e..1ee28ad4323cfec4bfed0c00eba2df096c2359ba 100644 (file)
@@ -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);
   }
 }
index c101bfad827f74a8657b680ad5728f3f534e0204..c02e12360dcf42c987ab5a367362c6b3e08579a6 100644 (file)
@@ -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);
   }
 
index a62e8eeaf2c76cd8826b9969dd06f8ebba17cef6..80b4c3aaca76049d5034fb0184119ffe933148d2 100644 (file)
@@ -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);
   }
index 3b5bb2a1bed832d7731b3a0734949d6ae10fbd2e..445a42a92eed0ce79fe7230a0bc07039197c63d6 100644 (file)
@@ -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);
   }
 
index d1870ba147bc6250d28998e2cd88ef9ba104f7b8..3e1d58e1c54ab4c5fb57fee19edf05ac0034c422 100644 (file)
@@ -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()
index 47cea6020effb68ac9eeb32dc459316b03296d6d..67bc934a1c4dacdb559d7ec6a2bebc425d52b719 100644 (file)
@@ -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);
   }
 }
index cdb89f9fb391ec737bd45e4c49f0f700d601e639..0447c254a40d9d039a9b0b6c2bdfef320ae41604 100644 (file)
@@ -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);
   }
 }
index ee7f12a2d66f59d2ae050a0b814f5c48f0d9ecca..535c591e86a73da987331e3766b6d2d89719b371 100644 (file)
@@ -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);
   }
 }
index 915b8d9420f8bc807f6a0629a25ddb64b2ad90fa..9acc72bd9dfa86174f7dea59f6f10a2bcac116f1 100644 (file)
@@ -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);
   }
 
index e1306b2231ba11c7be5ad29d27bcddabdfcd70e4..9bb4a41b4ef1c8a8fad1ccb26fcfecb6a1bf64b9 100644 (file)
@@ -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);
   }
 }