MDL-78893 Libaries: explicity set $flags for htmlspecialchars function

As part of PHP 8.2 compatibility explicitly set the flags for the
htmlspecialchars function, to convert both single and double quotes.
This commit is contained in:
Matt Porritt 2023-08-03 14:33:34 +10:00
parent a1d5d1b2f7
commit aa11164e07

View File

@ -106,7 +106,7 @@ echo $OUTPUT->header();
// The map dimension is here as big as the popup/page is, so max with and at least 360px height.
if ($ispopup) {
echo '<h1 class="iplookup h2">' . htmlspecialchars($title) . '</h1>';
echo '<h1 class="iplookup h2">' . htmlspecialchars($title, ENT_QUOTES | ENT_HTML401 | ENT_SUBSTITUTE) . '</h1>';
$mapdim = 'width: '
. (($width > 0) ? $width . 'px' : '100%')
. '; height: '