From: hickert Date: Thu, 8 Jul 2010 11:18:42 +0000 (+0000) Subject: Updated FAIscripts X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=05f973f1a4a28e03d527cfcbe24a53b227951045;p=gosa.git Updated FAIscripts -Made smarty assignments valid by replacing special chars like <> git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18964 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index 7d47a226a..78b4385e8 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -282,7 +282,7 @@ class faiScript extends plugin * If we post the escaped strings they will be escaped again */ foreach($this->attributes as $attrs){ - $smarty->assign($attrs,htmlentities($this->$attrs, ENT_QUOTES, 'utf-8')); + $smarty->assign($attrs,set_post($this->$attrs)); } $dn = $this->acl_base_for_current_object($this->dn); @@ -482,7 +482,7 @@ class faiScript extends plugin { $vars = array("cn"); $smarty = get_smarty(); - $smarty->assign("cn", htmlentities($this->cn)); + $smarty->assign("cn", set_post($this->cn)); $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE)); $ret = array(); $ret['string'] = $str; diff --git a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc index 33c38f35d..2371f6b30 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc @@ -66,9 +66,8 @@ class faiScriptEntry extends plugin } foreach($this->attributes as $attrs){ - $smarty->assign($attrs, htmlentities($this->$attrs, ENT_QUOTES, 'utf-8')); + $smarty->assign($attrs, set_post($this->$attrs)); } - $smarty->assign('FAIscript', htmlentities($this->FAIscript, ENT_QUOTES, 'utf-8')); /* File download requested */ if(isset($_POST['download'])){