From: hickert Date: Wed, 18 Jun 2008 09:43:59 +0000 (+0000) Subject: Added recursive htmlentities. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dc0389bb93081b0a4fd738aa6a323aeb136dbab4;p=gosa.git Added recursive htmlentities. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11356 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index ab153dd0a..102bc4f65 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -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.