summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24187cd)
raw | patch | inline | side by side (parent: 24187cd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 13:41:24 +0000 (13:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 13:41:24 +0000 (13:41 +0000) |
Added xmlentities to gosa.conf generation.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10214 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10214 594d385d-05f5-0310-b6e9-bd551577e9d8
index cbcebe94b92bf6d5598d0c744a1a76e71f69e7ea..9ce2f2abf4b7c2179b6ceca7c015e4169fa65c9d 100644 (file)
@@ -2671,14 +2671,17 @@ function send_binary_content($data,$name,$type = "application/octet-stream")
HTML output, without breaking quotes.
@param The String we want to encode.
@return The encoded String
-*/
+ */
function xmlentities($str)
{
if(is_string($str)){
return(htmlentities($str,ENT_QUOTES));
- }else{
- return($str);
+ }elseif(is_array($str)){
+ foreach($str as $name => $value){
+ $str[$name] = xmlentities($value);
+ }
}
+ return($str);
}
diff --git a/gosa-core/setup/class_setupStep_Config1.inc b/gosa-core/setup/class_setupStep_Config1.inc
index d418df8639fe6fb9a43d6c8efc1e2e4746dc3f99..1087b6a2b18af2da7ebc52cb32659aba184de84c 100644 (file)
$smarty->assign("pwd_rules",$this->pwd_rules);
$smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
foreach($this->attributes as $attr){
- $smarty->assign($attr,xmlentities($this->$attr));
+ $smarty->assign($attr,$this->$attr);
}
/* !!! Attention strict is inverse. If you change this,
diff --git a/gosa-core/setup/class_setupStep_Config2.inc b/gosa-core/setup/class_setupStep_Config2.inc
index 97a5c02e8c5a2ef58df93fd662936eb505c8a60f..450fe81e1c20c6ef30dbb700f57526944166cfba 100644 (file)
$smarty->assign("samba_settings",$this->samba_settings);
$smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
foreach($this->attributes as $attr){
- $smarty->assign($attr,xmlentities($this->$attr));
+ $smarty->assign($attr,$this->$attr);
}
$smarty->assign("timezone" ,$this->timezone);
$smarty->assign("timezones" ,$this->timezones);
diff --git a/gosa-core/setup/class_setupStep_Config3.inc b/gosa-core/setup/class_setupStep_Config3.inc
index 7712c705506bc98628cf67cefc6454438d673fe9..cd62785e3b9c751505cbdb0797a924b07612a27e 100644 (file)
$smarty->assign("optional", $this->optional);
foreach($this->attributes as $attr){
- $smarty->assign($attr,xmlentities($this->$attr));
+ $smarty->assign($attr,$this->$attr);
}
$smarty->assign("login_attributes",$this->login_attributes);
return($smarty -> fetch (get_template_path("../setup/setup_config3.tpl")));
diff --git a/gosa-core/setup/class_setupStep_Feedback.inc b/gosa-core/setup/class_setupStep_Feedback.inc
index 0863e1fd0d413b977184bcc3a195dd5a0d2c16bc..cf89cf6d2e0ef59bd43f9830bb9a4c029e0db7fa 100644 (file)
$smarty = get_smarty();
foreach($this->attributes as $attr){
- $smarty->assign($attr, xmlentities($this->$attr));
+ $smarty->assign($attr, $this->$attr);
}
$smarty->assign("years",$years);
$smarty->assign("features_used",$this->features_used);
diff --git a/gosa-core/setup/class_setupStep_Finish.inc b/gosa-core/setup/class_setupStep_Finish.inc
index aecc280c0062c0ffe9450767af7a4d9abbc91321..2d64638dcac59f939bf0f4794b51d5dc2893b35b 100644 (file)
function get_conf_data()
{
$smarty = get_smarty();
- $smarty->assign("cv",$this->parent->captured_values);
+ $smarty->assign("cv",xmlentities($this->parent->captured_values));
$str = $smarty->fetch(CONFIG_TEMPLATE_DIR.$this->gosa_conf_contrib);
return($str);
}
index 855a4a8d35800ea1e97314b7fd440a36360087a4..e831ec1055f6fbf57d52cfe65db249dcfea652a0 100644 (file)
{
$smarty = get_smarty();
foreach($this->attributes as $attr){
- $smarty->assign($attr,xmlentities($this->$attr));
+ $smarty->assign($attr,$this->$attr);
}
/* Assign connection status */
$base_to_append = $this->base;
if(strlen($base_to_append) > 20){
- $base_to_append = xmlentities(substr($base_to_append,0,17)."...");
+ $base_to_append = substr($base_to_append,0,17)."...";
}
$smarty->assign("base_to_append",$base_to_append);
return($smarty -> fetch (get_template_path("../setup/setup_ldap.tpl")));
diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc
index cec90017e36f65a445f076e5711699bdda8aee76..7e45ca33e28fff923493f83bb731d1d925d16bbc 100644 (file)
$uid = $_POST['new_user_uid'];
}
- $smarty->assign("new_user_uid", xmlentities($uid));
- $smarty->assign("new_user_password",xmlentities(@$_POST['new_user_password']));
- $smarty->assign("new_user_password2",xmlentities(@$_POST['new_user_password2']));
+ $smarty->assign("new_user_uid",$uid);
+ $smarty->assign("new_user_password",@$_POST['new_user_password']);
+ $smarty->assign("new_user_password2",@$_POST['new_user_password2']);
$smarty->assign("method","create_acls");
$smarty->assign("acl_create_selected",$this->acl_create_selected);
$smarty->assign("what_will_be_done_now",$this->acl_create_changes);