Skip to content

Commit 79d6be9

Browse files
author
Till Brehm
committed
Fixed a typo in htmlentities function and added htmlentities to dashlet output.
1 parent 5902e62 commit 79d6be9

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

interface/lib/classes/functions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ public function htmlentities($value) {
460460

461461
if(is_array($value)) {
462462
$out = array();
463-
foreach($values as $key => $val) {
463+
foreach($value as $key => $val) {
464464
if(is_array($val)) {
465465
$out[$key] = $this->htmlentities($val);
466466
} else {

interface/web/dashboard/dashlets/databasequota.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function show() {
2121

2222
$has_databasequota = false;
2323
if(is_array($databases) && !empty($databases)){
24+
$databases = $app->functions->htmlentities($databases);
2425
$tpl->setloop('databasequota', $databases);
2526
$has_databasequota = isset($databases[0]['used']);
2627
}

interface/web/dashboard/dashlets/limits.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function show() {
154154
'percentage' => $percentage);
155155
}
156156
}
157+
$rows = $app->functions->htmlentities($rows);
157158
$tpl->setLoop('rows', $rows);
158159

159160

interface/web/dashboard/dashlets/mailquota.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ function show() {
2121

2222
$has_mailquota = false;
2323
if(is_array($emails) && !empty($emails)){
24+
// email username is quoted in quota.lib already, so no htmlentities here to prevent double encoding
25+
//$emails = $app->functions->htmlentities($emails);
2426
$tpl->setloop('mailquota', $emails);
2527
$has_mailquota = isset($emails[0]['used']);
2628
}

interface/web/dashboard/dashlets/quota.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function show() {
2121

2222
$has_quota = false;
2323
if(is_array($sites) && !empty($sites)){
24+
$sites = $app->functions->htmlentities($sites);
2425
$tpl->setloop('quota', $sites);
2526
$has_quota = isset($sites[0]['used']);
2627
}

0 commit comments

Comments
 (0)