From c5600b724422fa9f68f42c11b7515320f299ec89 Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Sat, 7 Dec 2024 17:50:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmd=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/admin/md_check.php | 10 +++------- web/template/syzoj/problem.php | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/web/admin/md_check.php b/web/admin/md_check.php index 9f74a95..f9e4e27 100644 --- a/web/admin/md_check.php +++ b/web/admin/md_check.php @@ -1,17 +1,13 @@ ", "", $markdown); - $markdown = str_replace("

", "\n", $markdown); - $markdown = str_replace("
", "\n", $markdown); return $markdown; } diff --git a/web/template/syzoj/problem.php b/web/template/syzoj/problem.php index 4ac54b4..39e14d8 100644 --- a/web/template/syzoj/problem.php +++ b/web/template/syzoj/problem.php @@ -128,7 +128,9 @@ if ($pr_flag) { strpos($s, "class=\"md") === false ) // 没找到,那就加上 $s = "" . $s . ""; - $s = html_entity_decode($str, ENT_QUOTES, 'UTF-8'); + // $s = html_entity_decode($str, ENT_QUOTES, 'UTF-8'); + // 特殊转义 + $s = str_replace("
", "\n", $s); return $s; } ?>