Code

Updated department listing in class_listing.inc
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Nov 2009 07:29:25 +0000 (07:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Nov 2009 07:29:25 +0000 (07:29 +0000)
-Ensure that we can select departments with special chars like '

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14725 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc

index fbcc9b1dd7d8811ae990ae08d5b410125fe89841..39342d9fec4992dd420c50375fbad54f150ac7db 100644 (file)
@@ -450,7 +450,7 @@ class listing {
 
     // Save base
     if (isset($_POST['BASE']) && $this->baseMode) {
-      $base= validate($_POST['BASE']);
+      $base= get_post('BASE');
       if (isset($this->bases[$base])) {
         $this->base= $base;
         session::global_set("CurrentMainBase", $this->base);
@@ -644,8 +644,10 @@ class listing {
         $selected= " selected";
         $found= true;
       }
-      $result.= "<option value='".$key."'$selected>".$value."</option>";
+      $key = htmlentities($key,ENT_QUOTES);
+      $result.= "\n<option value=\"".$key."\"$selected>".$value."</option>";
     }
+
     $result.= "</select>";
 
     // Reset the currently used base to the first DN we found if there