summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76a1d2a)
raw | patch | inline | side by side (parent: 76a1d2a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jun 2008 08:41:17 +0000 (08:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jun 2008 08:41:17 +0000 (08:41 +0000) |
Fixed problem with unusable configuration file, xml tags are now replaced correctly.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11353 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11353 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history | |
gosa-core/setup/class_setupStep_Ldap.inc | patch | blob | history |
index 62ca20be90ef9dd3ef3e39363cb94139ba1f7d7a..ab153dd0ad5665ab84989a507a9222029493840f 100644 (file)
function xmlentities($str)
{
if(is_string($str)){
- return(htmlentities($str,ENT_QUOTES));
+
+ static $asc2uni= array();
+ if (!count($asc2uni)){
+ for($i=128;$i<256;$i++){
+ # $asc2uni[chr($i)] = "&#x".dechex($i).";";
+ }
+ }
+
+ $str = str_replace("&", "&", $str);
+ $str = str_replace("<", "<", $str);
+ $str = str_replace(">", ">", $str);
+ $str = str_replace("'", "'", $str);
+ $str = str_replace("\"", """, $str);
+ $str = str_replace("\r", "", $str);
+ $str = strtr($str,$asc2uni);
+ return $str;
}elseif(is_array($str)){
foreach($str as $name => $value){
$str[$name] = xmlentities($value);
index e831ec1055f6fbf57d52cfe65db249dcfea652a0..a590a3bf07c503c8ab13a486784649a3f8675c92 100644 (file)
{
$smarty = get_smarty();
foreach($this->attributes as $attr){
- $smarty->assign($attr,$this->$attr);
+ $smarty->assign($attr,htmlentities($this->$attr,ENT_QUOTES,"UTF-8"));
}
/* Assign connection status */