diff --git a/lib/zin/helper.php b/lib/zin/helper.php index 4195cc746b..d2e5cf695f 100644 --- a/lib/zin/helper.php +++ b/lib/zin/helper.php @@ -115,7 +115,12 @@ else } } -function uncamelize($camelCaps, $separator = '-') +function uncamelize(string $camelCaps, string $separator = '-'): string { return strtolower(preg_replace('/([a-z])([A-Z])/', "$1" . $separator . "$2", $camelCaps)); } + +function isHTML(string $string): bool +{ + return $string !== strip_tags($string) ? true : false; +} diff --git a/lib/zin/wg/history/v1.php b/lib/zin/wg/history/v1.php index 927753ad26..68e5a2c61d 100644 --- a/lib/zin/wg/history/v1.php +++ b/lib/zin/wg/history/v1.php @@ -119,7 +119,7 @@ class history extends wg div ( setClass('comment-content mt-2 ml-6 p-2.5'), - $comment, + isHTML($comment) ? html($comment) : $comment, ), ); }