This commit is contained in:
沈唁 2022-05-30 11:11:44 +08:00 committed by GitHub
parent 59a5c8d14d
commit 88c3bfe13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1054,8 +1054,8 @@ class Archive extends Contents
{
$rules = [];
$allows = [
'description' => htmlspecialchars($this->description),
'keywords' => htmlspecialchars($this->keywords),
'description' => htmlspecialchars($this->description ?? ''),
'keywords' => htmlspecialchars($this->keywords ?? ''),
'generator' => $this->options->generator,
'template' => $this->options->theme,
'pingback' => $this->options->xmlRpcUrl,
@ -1320,7 +1320,7 @@ class Archive extends Contents
*/
public function keywords(string $split = ',', string $default = '')
{
echo empty($this->keywords) ? $default : str_replace(',', $split, htmlspecialchars($this->keywords));
echo empty($this->keywords) ? $default : str_replace(',', $split, htmlspecialchars($this->keywords ?? ''));
}
/**