From d7aa8ef257a50488d016fb7447201798abcd0632 Mon Sep 17 00:00:00 2001
From: klarkxy <278370456@qq.com>
Date: Sat, 7 Dec 2024 17:52:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BB=A3=E7=A0=81=E5=9D=97?=
=?UTF-8?q?=E4=B8=AD=E7=9A=84
?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/admin/md_check.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/admin/md_check.php b/web/admin/md_check.php
index f9e4e27..6195e52 100644
--- a/web/admin/md_check.php
+++ b/web/admin/md_check.php
@@ -4,7 +4,11 @@ function decodeMarkdownEntities($markdown) {
// $markdown = preg_replace_callback('/(```.*?```|`[^`]*`)/s', function ($matches) {
// return htmlentities($matches[0], ENT_QUOTES, 'UTF-8');
// }, $markdown);
-
+ // Remove
tags in code blocks
+ $markdown = preg_replace_callback('/(```.*?```|`[^`]*`)/s', function ($matches) {
+ return str_replace('
', '', $matches[0]);
+ }, $markdown);
+
// Decode HTML entities in inline math and display math
$markdown = preg_replace_callback('/(\$\$.*?\$\$|\$[^$]*\$)/s', function ($matches) {
return htmlentities($matches[0], ENT_QUOTES, 'UTF-8');