From c7c1f55cd476d8ed3147bf6a92023f804542ff41 Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Mon, 4 Aug 2025 17:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=9D=97=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=B0=96=E6=8B=AC=E5=8F=B7=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/admin/md_check.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/admin/md_check.php b/web/admin/md_check.php index 55535f4..7686c16 100644 --- a/web/admin/md_check.php +++ b/web/admin/md_check.php @@ -5,5 +5,11 @@ function MarkdownEntities($markdown) { $markdown = preg_replace_callback('/\$\$(.*?)\$\$/s', function ($matches) { return str_replace(['<', '>'], ['\\lt', '\\gt'], $matches[0]); }, $markdown); + $markdown = preg_replace_callback('/```(.*?)```/s', function ($matches) { + return str_replace(['<', '>'], ['<', '>'], $matches[0]); + }, $markdown); + $markdown = preg_replace_callback('/`(.*?)`/s', function ($matches) { + return str_replace(['<', '>'], ['<', '>'], $matches[0]); + }, $markdown); return $markdown; }