Code

Added recursive htmlentities.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Jun 2008 09:43:59 +0000 (09:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Jun 2008 09:43:59 +0000 (09:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11356 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index ab153dd0ad5665ab84989a507a9222029493840f..102bc4f651deb945f68bd2f95413c7eff3f36599 100644 (file)
@@ -2707,6 +2707,19 @@ function send_binary_content($data,$name,$type = "application/octet-stream")
 }
 
 
+function reverse_html_entities($str,$type = ENT_QUOTES , $charset = "UTF-8")
+{
+  if(is_string($str)){
+    return(htmlentities($str,$type,$charset));
+  }elseif(is_array($str)){
+    foreach($str as $name => $value){
+      $str[$name] = reverse_html_entities($value,$type,$charset);
+    }
+  }
+  return($str);
+}
+
+
 /*! \brief Encode special string characters so we can use the string in \
            HTML output, without breaking quotes.
     @param  The String we want to encode.