From adb487ae3f57041cc577f615f35430bc7ae28ab2 Mon Sep 17 00:00:00 2001 From: Richard Klees Date: Fri, 17 May 2024 08:15:21 +0200 Subject: [PATCH] Data: fix Meta/Tag::toHtml (#40110) --- src/Data/Meta/Html/OpenGraph/Tag.php | 2 +- src/Data/Meta/Html/UserDefined.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Meta/Html/OpenGraph/Tag.php b/src/Data/Meta/Html/OpenGraph/Tag.php index ee753566cec0..f723c9b98efd 100644 --- a/src/Data/Meta/Html/OpenGraph/Tag.php +++ b/src/Data/Meta/Html/OpenGraph/Tag.php @@ -33,7 +33,7 @@ public function __construct( public function toHtml(): string { - return "property_name\" content=\"{$this->getValue()}\" />"; + return "property_name) . "\" content=\"" . htmlspecialchars($this->getValue()) . "\" />"; } abstract protected function getValue(): string; diff --git a/src/Data/Meta/Html/UserDefined.php b/src/Data/Meta/Html/UserDefined.php index bceee2649ce4..847a9111a29b 100644 --- a/src/Data/Meta/Html/UserDefined.php +++ b/src/Data/Meta/Html/UserDefined.php @@ -37,7 +37,7 @@ public function __construct( */ public function toHtml(): string { - return "key\" content=\"$this->value\" />"; + return "key) . "\" content=\"" . htmlspecialchars($this->value) . "\" />"; } public function getKey(): string