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

@@ -12,24 +12,28 @@ require_once ("../include/problem.php");
// contest_id
$title = $_POST['title'];
$title = str_replace(",", ",", $title);
// $title = str_replace(",", ",", $title);
$title = htmlspecialchars_decode($title, ENT_QUOTES, 'UTF-8');
$time_limit = $_POST['time_limit'];
$memory_limit = $_POST['memory_limit'];
$description = $_POST['description'];
//$description = str_replace("<p>", "", $description);
//$description = str_replace("</p>", "<br />", $description);
$description = str_replace(",", "&#44;", $description);
// $description = str_replace(",", "&#44;", $description);
$description = htmlspecialchars_decode($description, ENT_QUOTES, 'UTF-8');
$input = $_POST['input'];
//$input = str_replace("<p>", "", $input);
//$input = str_replace("</p>", "<br />", $input);
$input = str_replace(",", "&#44;", $input);
// $input = str_replace(",", "&#44;", $input);
$input = htmlspecialchars_decode($input, ENT_QUOTES, 'UTF-8');
$output = $_POST['output'];
//$output = str_replace("<p>", "", $output);
//$output = str_replace("</p>", "<br />", $output);
$output = str_replace(",", "&#44;", $output);
// $output = str_replace(",", "&#44;", $output);
$output = htmlspecialchars_decode($output, ENT_QUOTES, 'UTF-8');
$sample_input = $_POST['sample_input'];
$sample_output = $_POST['sample_output'];
@@ -44,7 +48,8 @@ if ($test_output=="") $test_output="\n";
$hint = $_POST['hint'];
//$hint = str_replace("<p>", "", $hint);
//$hint = str_replace("</p>", "<br />", $hint);
$hint = str_replace(",", "&#44;", $hint);
// $hint = str_replace(",", "&#44;", $hint);
$hint = htmlspecialchars_decode($hint, ENT_QUOTES, 'UTF-8');
$source = $_POST['source'];