Skip to content

Commit

Permalink
Merge pull request #180 from catalyst/php81-dep
Browse files Browse the repository at this point in the history
Remove null call to htmlspecialchars
  • Loading branch information
matthewhilton authored Sep 15, 2023
2 parents 10c13c8 + de97e33 commit c7a50c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
* @return string HTML snippet which can be used in output.
*/
function tool_crawler_link($url, $label, $redirect = '', $labelishtml = false) {
if (empty($label)) {
// Ensure that label is always at least a string.
$label = '';
}
if (!$labelishtml) {
$label = htmlspecialchars($label, ENT_NOQUOTES | ENT_HTML401);
}
Expand Down

0 comments on commit c7a50c0

Please sign in to comment.