阻止html合并换行

This commit is contained in:
2024-12-06 16:14:10 +08:00
parent 6865663dc1
commit fdcbd1f980
3 changed files with 18 additions and 19 deletions

View File

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

View File

@@ -48,15 +48,14 @@ if (!(isset($_SESSION[$OJ_NAME . '_' . 'administrator']) || isset($_SESSION[$OJ_
</p>
<p align=left>
<?php echo "<h4>" . $MSG_Description . "(<64kB)</h4>" ?>
<textarea class="kindeditor" rows=13 name=description cols=80></textarea><br>
</p>
<textarea class="kindeditor" rows=13 name=description cols=80></textarea></p>
<p align=left>
<?php echo "<h4>" . $MSG_Input . "(<64kB)</h4>" ?>
<textarea class="kindeditor" rows=13 name=input cols=80></textarea><br></textarea><br>
<textarea class="kindeditor" rows=13 name=input cols=80></textarea></textarea><br>
</p>
<p align=left>
<?php echo "<h4>" . $MSG_Output . "(<64kB)</h4>" ?>
<textarea class="kindeditor" rows=13 name=output cols=80></textarea><br></textarea><br>
<textarea class="kindeditor" rows=13 name=output cols=80></textarea></textarea><br>
</p>
<p align=left>
<?php echo "<h4>" . $MSG_Sample_Input . "(<64kB)</h4>" ?>
@@ -78,7 +77,7 @@ if (!(isset($_SESSION[$OJ_NAME . '_' . 'administrator']) || isset($_SESSION[$OJ_
</p>
<p align=left>
<?php echo "<h4>" . $MSG_HINT . "(<64kB)</h4>" ?>
<textarea class="kindeditor" rows=13 name=hint cols=80></textarea><br></textarea><br>
<textarea class="kindeditor" rows=13 name=hint cols=80></textarea></textarea><br>
</p>
<p>
<?php echo "<h4>" . $MSG_SPJ . "</h4>" ?>

View File

@@ -61,17 +61,17 @@ include_once("kindeditor.php") ;
</p>
<p align=left>
<?php echo "<h4>".$MSG_Description."</h4>"?>
<textarea class="kindeditor" rows=13 name=description cols=80><?php echo htmlentities($row['description'],ENT_QUOTES,"UTF-8")?></textarea><br>
<textarea class="kindeditor" style="white-space:pre-wrap;" rows=13 name=description cols=80><?php echo htmlentities($row['description'],ENT_QUOTES,"UTF-8")?></textarea><br>
</p>
<p align=left>
<?php echo "<h4>".$MSG_Input."</h4>"?>
<textarea class="kindeditor" rows=13 name=input cols=80><?php echo htmlentities($row['input'],ENT_QUOTES,"UTF-8")?></textarea><br>
<textarea class="kindeditor" style="white-space:pre-wrap;" rows=13 name=input cols=80><?php echo htmlentities($row['input'],ENT_QUOTES,"UTF-8")?></textarea><br>
</p>
<p align=left>
<?php echo "<h4>".$MSG_Output."</h4>"?>
<textarea class="kindeditor" rows=13 name=output cols=80><?php echo htmlentities($row['output'],ENT_QUOTES,"UTF-8")?></textarea><br>
<textarea class="kindeditor" style="white-space:pre-wrap;" rows=13 name=output cols=80><?php echo htmlentities($row['output'],ENT_QUOTES,"UTF-8")?></textarea><br>
</p>
<p align=left>
@@ -86,7 +86,7 @@ include_once("kindeditor.php") ;
<p align=left>
<?php echo "<h4>".$MSG_HINT."</h4>"?>
<textarea class="kindeditor" rows=13 name=hint cols=80><?php echo htmlentities($row['hint'],ENT_QUOTES,"UTF-8")?></textarea><br>
<textarea class="kindeditor" style="white-space:pre-wrap;" rows=13 name=hint cols=80><?php echo htmlentities($row['hint'],ENT_QUOTES,"UTF-8")?></textarea><br>
</p>
<p>
@@ -227,7 +227,7 @@ 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 = html_entity_decode($title,ENT_QUOTES,"UTF-8");
// $title = html_entity_decode($title,ENT_QUOTES,"UTF-8");
$time_limit = $_POST['time_limit'];
@@ -237,19 +237,19 @@ include_once("kindeditor.php") ;
// $description = str_replace("<p>", "", $description);
// $description = str_replace("</p>", "<br />", $description);
// $description = str_replace(",", "&#44;", $description);
$description = html_entity_decode($description,ENT_QUOTES,"UTF-8");
// $description = html_entity_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 = html_entity_decode($input,ENT_QUOTES,"UTF-8");
// $input = html_entity_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 = html_entity_decode($output,ENT_QUOTES,"UTF-8");
// $output = html_entity_decode($output,ENT_QUOTES,"UTF-8");
$sample_input = $_POST['sample_input'];
$sample_output = $_POST['sample_output'];
@@ -260,7 +260,7 @@ include_once("kindeditor.php") ;
// $hint = str_replace("<p>", "", $hint);
// $hint = str_replace("</p>", "<br />", $hint);
// $hint = str_replace(",", "&#44;", $hint);
$hint = html_entity_decode($hint,ENT_QUOTES,"UTF-8");
// $hint = html_entity_decode($hint,ENT_QUOTES,"UTF-8");
$source = $_POST['source'];
$remote_oj= $_POST['remote_oj'];