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

@@ -5,7 +5,7 @@ function addproblem($title, $time_limit, $memory_limit, $description, $input, $o
//echo $sql;
$pid = pdo_query($sql, $title, $time_limit, $memory_limit, $description, $input, $output, $sample_input, $sample_output, $hint, $source, $spj);
echo "New Problem:<a target=_blank href='../problem.php?id=$pid'>$pid ".htmlentities($title,ENT_QUOTES)."</a> added!<br>";
echo "New Problem:<a target=_blank href='../problem.php?id=$pid'>$pid ".htmlspecialchars($title,ENT_QUOTES)."</a> added!<br>";
if (isset($_POST['contest_id']) && intval($_POST['contest_id'])>0) {
$cid = intval($_POST['contest_id']);