* zin: use html to parse history comments.

This commit is contained in:
dingyongliang
2023-07-07 09:40:00 +08:00
parent 3ffc3361bf
commit d0320daa84
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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,
),
);
}