From 514f4df2ad918e69575028d58b2e33aaf536e59b Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Thu, 6 Apr 2023 16:11:35 +0200 Subject: [PATCH] fix: added missing conversion to HTML entities --- phpmyfaq/src/phpMyFAQ/Tags.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpmyfaq/src/phpMyFAQ/Tags.php b/phpmyfaq/src/phpMyFAQ/Tags.php index 11ae448a05..7f9a72ac86 100644 --- a/phpmyfaq/src/phpMyFAQ/Tags.php +++ b/phpmyfaq/src/phpMyFAQ/Tags.php @@ -31,12 +31,12 @@ class Tags /** * @var Configuration */ - private $config; + private Configuration $config; /** * @var array */ - private $recordsByTagName = []; + private array $recordsByTagName = []; /** * Constructor. @@ -59,11 +59,11 @@ public function getAllLinkTagsById(int $recordId): string $tagListing = ''; foreach ($this->getAllTagsById($recordId) as $taggingId => $taggingName) { - $title = Strings::htmlspecialchars($taggingName, ENT_QUOTES, 'utf-8'); + $title = Strings::htmlentities($taggingName); $url = sprintf('%sindex.php?action=search&tagging_id=%d', $this->config->getDefaultUrl(), $taggingId); $oLink = new Link($url, $this->config); - $oLink->itemTitle = $taggingName; - $oLink->text = $taggingName; + $oLink->itemTitle = $title; + $oLink->text = $title; $oLink->tooltip = $title; $tagListing .= $oLink->toHtmlAnchor() . ', '; }