Add missing htmlspecialchars in Wikidata results list

This commit is contained in:
Joshua Ramon Enslin 2021-08-15 20:03:25 +02:00
parent 6d60d9eec7
commit a0b6207f81
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -1688,7 +1688,7 @@ final class NodaWikidataFetcher {
return '';
}
$output = '<div><a href="' . $link . 'suchbegriff=' . $searchTerm . '&wikidata_id=' . $result['id'] . '&lang=' . $lang . '">
$output = '<div><a href="' . $link . 'suchbegriff=' . htmlspecialchars($searchTerm) . '&wikidata_id=' . htmlspecialchars((string)$result['id']) . '&lang=' . htmlspecialchars($lang) . '">
<h4 class="icons iconsTag">' . $result['id'] . '</h4>';
$output .= '<p class="wikidataSummary">' . $result['label'];
if (!empty($result['label_ext'])) $output .= " (<span class='icons iconsTranslate'>{$result['label_ext']}</span>)";