Skip to content

Commit

Permalink
fix trim htmlspecialchars null param
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Jan 20, 2025
1 parent 3338f04 commit 7ef816f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
$imageresizer = $imageresizer ? 1 : 0;
$s = $text;

if ($strip_html) {
if ($strip_html && !is_null($s)) {
$s = htmlspecialchars($s);
}

Expand Down Expand Up @@ -2537,7 +2537,7 @@ function stdhead($title = "", $msgalert = true, $script = "", $place = "")
foreach ($icons as $icon) {

?>
<link rel="stylesheet" href="<?php echo htmlspecialchars(trim($icon['cssfile'], '/')).$cssupdatedate?>" type="text/css" />
<link rel="stylesheet" href="<?php echo htmlspecialchars(trim($icon['cssfile'] ?? '', '/')).$cssupdatedate?>" type="text/css" />
<?php
}}
}
Expand Down

0 comments on commit 7ef816f

Please sign in to comment.