Code

Updated FAIscripts
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jul 2010 11:18:42 +0000 (11:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jul 2010 11:18:42 +0000 (11:18 +0000)
-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

gosa-plugins/fai/admin/fai/class_faiScript.inc
gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc

index 7d47a226a36afd5692ef8a36341bd1812fc53af8..78b4385e8e633e01e1f0e7c10c1625fa2629b80b 100644 (file)
@@ -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;
index 33c38f35d72fb598105c94eb6181951674b31c48..2371f6b30b58f7286a2d632ef36e47756842129d 100644 (file)
@@ -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'])){