htmlentities -> htmlspecialchars

This commit is contained in:
2024-12-06 15:35:38 +08:00
parent daa005f029
commit d9b2d13caa
184 changed files with 410 additions and 405 deletions

View File

@@ -39,7 +39,7 @@
$hash_num=hexdec(substr(md5($cat),0,7));
$label_theme=$color_theme[$hash_num%count($color_theme)];
if($label_theme=="") $label_theme="default";
$view_category.= "<a class='label label-$label_theme' style='display: inline-block; margin:5px ' href='problemset.php?search=".htmlentities(urlencode($cat),ENT_QUOTES,'utf-8')."'>".htmlentities($cat,ENT_QUOTES,'utf-8')."</a>&nbsp;";
$view_category.= "<a class='label label-$label_theme' style='display: inline-block; margin:5px ' href='problemset.php?search=".htmlspecialchars(urlencode($cat),ENT_QUOTES,'utf-8')."'>".htmlspecialchars($cat,ENT_QUOTES,'utf-8')."</a>&nbsp;";
}