diff --git a/webui/controller/policy/archiving.php b/webui/controller/policy/archiving.php index 33c60fc..437ca4a 100644 --- a/webui/controller/policy/archiving.php +++ b/webui/controller/policy/archiving.php @@ -41,7 +41,7 @@ } } - $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 @@ } } - -?> diff --git a/webui/controller/policy/removearchiving.php b/webui/controller/policy/removearchiving.php index c8aaf71..fd2785d 100644 --- a/webui/controller/policy/removearchiving.php +++ b/webui/controller/policy/removearchiving.php @@ -26,7 +26,7 @@ $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 @@ } - -?> diff --git a/webui/controller/policy/removeretention.php b/webui/controller/policy/removeretention.php index dc62bf1..5ab6152 100644 --- a/webui/controller/policy/removeretention.php +++ b/webui/controller/policy/removeretention.php @@ -26,7 +26,7 @@ $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 @@ } - -?> diff --git a/webui/controller/policy/retention.php b/webui/controller/policy/retention.php index 7df8dfb..4723723 100644 --- a/webui/controller/policy/retention.php +++ b/webui/controller/policy/retention.php @@ -42,7 +42,7 @@ } - $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 @@ } - -?> diff --git a/webui/system/misc.php b/webui/system/misc.php index ce9fff3..8908461 100644 --- a/webui/system/misc.php +++ b/webui/system/misc.php @@ -556,4 +556,14 @@ } -?> +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; +}