diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Helper/TextHelper.php | 13 | ||||
-rw-r--r-- | app/Template/project_overview/information.php | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/app/Helper/TextHelper.php b/app/Helper/TextHelper.php index 66583cd1..89c1a8f3 100644 --- a/app/Helper/TextHelper.php +++ b/app/Helper/TextHelper.php @@ -25,6 +25,19 @@ class TextHelper extends Base } /** + * Join with HTML escaping + * + * @param $glue + * @param array $list + * @return string + */ + public function implode($glue, array $list) + { + array_walk($list, function (&$value) { $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); }); + return implode($glue, $list); + } + + /** * Markdown transformation * * @param string $text diff --git a/app/Template/project_overview/information.php b/app/Template/project_overview/information.php index 0fe53e08..e8c20903 100644 --- a/app/Template/project_overview/information.php +++ b/app/Template/project_overview/information.php @@ -13,8 +13,8 @@ <?php foreach ($roles as $role => $role_name): ?> <?php if (isset($users[$role])): ?> <li> - <?= $role_name ?>: - <strong><?= implode(', ', $users[$role]) ?></strong> + <?= $this->text->e($role_name) ?>: + <strong><?= $this->text->implode(', ', $users[$role]) ?></strong> </li> <?php endif ?> <?php endforeach ?> |