Skip to content

Commit

Permalink
fix: added missing conversion to HTML entities
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Apr 6, 2023
1 parent 0a4980d commit 514f4df
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions phpmyfaq/src/phpMyFAQ/Tags.php
Expand Up @@ -31,12 +31,12 @@ class Tags
/**
* @var Configuration
*/
private $config;
private Configuration $config;

/**
* @var array<int, string>
*/
private $recordsByTagName = [];
private array $recordsByTagName = [];

/**
* Constructor.
Expand All @@ -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&amp;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() . ', ';
}
Expand Down

0 comments on commit 514f4df

Please sign in to comment.