diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index 2620f927bc..3b1e726e89 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -114,14 +114,14 @@ class Archive extends Contents /** * 本页关键字 * - * @var string + * @var string|null */ - private string $archiveKeywords; + private ?string $archiveKeywords = null; /** * 本页描述 * - * @var string + * @var string|null */ private ?string $archiveDescription = null; @@ -1023,7 +1023,7 @@ public function header(?string $rule = null) $header .= '' . "\n"; $header .= '' . "\n"; + . htmlspecialchars($this->archiveDescription ?? ($this->options->description ?? '')) . '" />' . "\n"; $header .= '' . "\n"; $header .= '' . "\n"; $header .= '' . "\n";