diff --git a/webui/controller/policy/archiving.php b/webui/controller/policy/archiving.php index 33c60fca..437ca4a5 100644 --- a/webui/controller/policy/archiving.php +++ b/webui/controller/policy/archiving.php @@ -41,7 +41,7 @@ class ControllerPolicyArchiving extends Controller { } } - $this->data['rules'] = $this->model_policy_archiving->get_rules($this->data['search']); + $this->data['rules'] = htmlentities_on_array($this->model_policy_archiving->get_rules($this->data['search'])); $this->render(); @@ -61,5 +61,3 @@ class ControllerPolicyArchiving extends Controller { } } - -?> diff --git a/webui/controller/policy/removearchiving.php b/webui/controller/policy/removearchiving.php index c8aaf71e..fd2785d0 100644 --- a/webui/controller/policy/removearchiving.php +++ b/webui/controller/policy/removearchiving.php @@ -26,7 +26,7 @@ class ControllerPolicyRemovearchiving extends Controller { $this->data['confirmed'] = (int)@$this->request->get['confirmed']; - $this->data['rule'] = $this->model_policy_archiving->get_rule($this->data['id']); + $this->data['rule'] = htmlentities_on_array($this->model_policy_archiving->get_rule($this->data['id'])); if($this->validate() == true) { @@ -72,5 +72,3 @@ class ControllerPolicyRemovearchiving extends Controller { } - -?> diff --git a/webui/controller/policy/removeretention.php b/webui/controller/policy/removeretention.php index dc62bf14..5ab61525 100644 --- a/webui/controller/policy/removeretention.php +++ b/webui/controller/policy/removeretention.php @@ -26,7 +26,7 @@ class ControllerPolicyRemoveretention extends Controller { $this->data['confirmed'] = (int)@$this->request->get['confirmed']; - $this->data['rule'] = $this->model_policy_retention->get_rule($this->data['id']); + $this->data['rule'] = htmlentities_on_array($this->model_policy_retention->get_rule($this->data['id'])); if($this->validate() == true) { @@ -72,5 +72,3 @@ class ControllerPolicyRemoveretention extends Controller { } - -?> diff --git a/webui/controller/policy/retention.php b/webui/controller/policy/retention.php index 7df8dfb2..47237232 100644 --- a/webui/controller/policy/retention.php +++ b/webui/controller/policy/retention.php @@ -42,7 +42,7 @@ class ControllerPolicyRetention extends Controller { } - $this->data['rules'] = $this->model_policy_retention->get_rules($this->data['search']); + $this->data['rules'] = htmlentities_on_array($this->model_policy_retention->get_rules($this->data['search'])); $this->render(); @@ -66,5 +66,3 @@ class ControllerPolicyRetention extends Controller { } - -?> diff --git a/webui/system/misc.php b/webui/system/misc.php index ce9fff31..8908461e 100644 --- a/webui/system/misc.php +++ b/webui/system/misc.php @@ -556,4 +556,14 @@ function get_ldap_attribute_names($ldap_type = '') { } -?> +function htmlentities_on_array($arr = []) { + while(list($k, $v) = each($arr)) { + if(is_array($v)) { + $arr[$k] = htmlentities_on_array($v); + } else { + $arr[$k] = htmlentities($v); + } + } + + return $arr; +}