diff options
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/TextHelper.php | 13 |
1 files changed, 13 insertions, 0 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 |