diff --git a/include/sieve/class_sieveElement_Comment.inc b/include/sieve/class_sieveElement_Comment.inc
index c235616cad4e9987bc5ce7714dcb22737844bb04..deaa4f3120ba68ca16e18555117fdbb33c32b929 100644 (file)
{
$this->object_id = $object_id;
- if($data == NULL){
+ if($data === NULL){
$data = array('ELEMENTS' => array(array('class' => "quoted-string" ,"text" => "/*"._("Your comment here")."*/")));
}
{
if(isset($_POST['comment_'.$this->object_id])){
$cm = stripslashes( $_POST['comment_'.$this->object_id]);
+ $cm = preg_replace("/\*\//","* /",$cm);
$this->data = $cm;
}
}
/* Create html object */
- $smarty = get_smarty();
$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);
}
}