修复错误

This commit is contained in:
2024-12-06 15:39:05 +08:00
parent d9b2d13caa
commit 522ff3468e
6 changed files with 15 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ require_once ("../include/problem.php");
// contest_id
$title = $_POST['title'];
// $title = str_replace(",", ",", $title);
$title = htmlspecialchars_decode($title, ENT_QUOTES, 'UTF-8');
$title = htmlspecialchars_decode($title, ENT_QUOTES);
$time_limit = $_POST['time_limit'];
$memory_limit = $_POST['memory_limit'];
@@ -21,19 +21,19 @@ $description = $_POST['description'];
//$description = str_replace("<p>", "", $description);
//$description = str_replace("</p>", "<br />", $description);
// $description = str_replace(",", "&#44;", $description);
$description = htmlspecialchars_decode($description, ENT_QUOTES, 'UTF-8');
$description = htmlspecialchars_decode($description, ENT_QUOTES);
$input = $_POST['input'];
//$input = str_replace("<p>", "", $input);
//$input = str_replace("</p>", "<br />", $input);
// $input = str_replace(",", "&#44;", $input);
$input = htmlspecialchars_decode($input, ENT_QUOTES, 'UTF-8');
$input = htmlspecialchars_decode($input, ENT_QUOTES);
$output = $_POST['output'];
//$output = str_replace("<p>", "", $output);
//$output = str_replace("</p>", "<br />", $output);
// $output = str_replace(",", "&#44;", $output);
$output = htmlspecialchars_decode($output, ENT_QUOTES, 'UTF-8');
$output = htmlspecialchars_decode($output, ENT_QUOTES);
$sample_input = $_POST['sample_input'];
$sample_output = $_POST['sample_output'];
@@ -49,7 +49,7 @@ $hint = $_POST['hint'];
//$hint = str_replace("<p>", "", $hint);
//$hint = str_replace("</p>", "<br />", $hint);
// $hint = str_replace(",", "&#44;", $hint);
$hint = htmlspecialchars_decode($hint, ENT_QUOTES, 'UTF-8');
$hint = htmlspecialchars_decode($hint, ENT_QUOTES);
$source = $_POST['source'];

View File

@@ -227,7 +227,8 @@ include_once("kindeditor.php") ;
if (!(isset($_SESSION[$OJ_NAME.'_'."p$id"]) || isset($_SESSION[$OJ_NAME.'_'.'administrator']) || isset($_SESSION[$OJ_NAME.'_'.'problem_editor']) )) exit();
$title = $_POST['title'];
$title = str_replace(",", "&#44;", $title);
// $title = str_replace(",", "&#44;", $title);
$title = htmlspecialchars_decode($title,ENT_QUOTES);
$time_limit = $_POST['time_limit'];
@@ -237,19 +238,19 @@ include_once("kindeditor.php") ;
// $description = str_replace("<p>", "", $description);
// $description = str_replace("</p>", "<br />", $description);
// $description = str_replace(",", "&#44;", $description);
$description = htmlspecialchars_decode($description,ENT_QUOTES,"UTF-8");
$description = htmlspecialchars_decode($description,ENT_QUOTES);
$input = $_POST['input'];
// $input = str_replace("<p>", "", $input);
// $input = str_replace("</p>", "<br />", $input);
// $input = str_replace(",", "&#44;", $input);
$input = htmlspecialchars_decode($input,ENT_QUOTES,"UTF-8");
$input = htmlspecialchars_decode($input,ENT_QUOTES);
$output = $_POST['output'];
// $output = str_replace("<p>", "", $output);
// $output = str_replace("</p>", "<br />", $output);
// $output = str_replace(",", "&#44;", $output);
$output = htmlspecialchars_decode($output,ENT_QUOTES,"UTF-8");
$output = htmlspecialchars_decode($output,ENT_QUOTES);
$sample_input = $_POST['sample_input'];
$sample_output = $_POST['sample_output'];
@@ -260,7 +261,7 @@ include_once("kindeditor.php") ;
// $hint = str_replace("<p>", "", $hint);
// $hint = str_replace("</p>", "<br />", $hint);
// $hint = str_replace(",", "&#44;", $hint);
$hint = htmlspecialchars_decode($hint,ENT_QUOTES,"UTF-8");
$hint = htmlspecialchars_decode($hint,ENT_QUOTES);
$source = $_POST['source'];
$remote_oj= $_POST['remote_oj'];

View File

@@ -124,7 +124,7 @@ function getSolution($pid,$lang) {
function fixurl($img_url) {
if(substr($img_url,0,4)=="data") return $img_url;
$img_url = htmlspecialchars_decode($img_url,ENT_QUOTES,"UTF-8");
$img_url = htmlspecialchars_decode($img_url,ENT_QUOTES);
if (substr($img_url,0,4)!="http") {
if (substr($img_url,0,1)=="/") {