diff --git a/admin/manage-comments.php b/admin/manage-comments.php index c85e8a3c..22f0d489 100644 --- a/admin/manage-comments.php +++ b/admin/manage-comments.php @@ -131,7 +131,7 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == \Ty
author(true); ?> mail): ?> -
mail(); ?> +
mail(); ?> ip): ?>
ip(); ?> diff --git a/var/Widget/Base/Comments.php b/var/Widget/Base/Comments.php index f318711b..2c468e08 100644 --- a/var/Widget/Base/Comments.php +++ b/var/Widget/Base/Comments.php @@ -306,6 +306,18 @@ class Comments extends Base implements QueryInterface echo Common::subStr(strip_tags($this->content), 0, $length, $trim); } + /** + * 输出邮箱地址 + * + * @param bool $link + * @return void + */ + public function mail(bool $link = false) + { + $mail = htmlspecialchars($this->mail); + echo $link ? 'mailto:' . $mail : $mail; + } + /** * 获取查询对象 *