From e263d172cdf94fe6a55ca77cdf92fe3751fd0b38 Mon Sep 17 00:00:00 2001 From: augushong Date: Sun, 24 May 2026 08:59:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(debug):=20=E4=BF=AE=E5=A4=8DMarkdown?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E8=BE=93=E5=87=BA=E4=B8=BAUnicode=E8=BD=AC?= =?UTF-8?q?=E4=B9=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/base/common/tpl/think_exception_debug.tpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extend/base/common/tpl/think_exception_debug.tpl b/extend/base/common/tpl/think_exception_debug.tpl index 151a27b..6079c92 100644 --- a/extend/base/common/tpl/think_exception_debug.tpl +++ b/extend/base/common/tpl/think_exception_debug.tpl @@ -635,14 +635,14 @@ if (!function_exists('echo_value')) { // Message if (isset($message)) { $md = "# \u7cfb\u7edf\u53d1\u751f\u9519\u8bef\n\n## \u9519\u8bef\u4fe1\u606f\n> " . strip_tags((string)$message) . "\n\n"; - echo 'mdFragments.message = ' . json_encode($md) . ";\n"; + echo 'mdFragments.message = ' . json_encode($md, JSON_UNESCAPED_UNICODE) . ";\n"; } // Location if (isset($file) && isset($line)) { $fileEscaped = str_replace('\\', '\\\\', $file); $md = "## \u51fa\u9519\u4f4d\u7f6e\n- **File:** `{$fileEscaped}`\n- **Line:** `{$line}`\n\n"; - echo 'mdFragments.location = ' . json_encode($md) . ";\n"; + echo 'mdFragments.location = ' . json_encode($md, JSON_UNESCAPED_UNICODE) . ";\n"; } // Call Stack (per trace) @@ -676,7 +676,7 @@ if (isset($traces) && is_array($traces)) { } $md .= "\n"; } - echo "mdFragments.callstack = " . json_encode($md) . ";\n"; + echo "mdFragments.callstack = " . json_encode($md, JSON_UNESCAPED_UNICODE) . ";\n"; } } @@ -691,7 +691,7 @@ if (isset($traces) && is_array($traces)) { $md .= "{$lineNum}{$marker}: " . rtrim($value) . "\n"; } $md .= "```\n\n"; - echo "mdFragments.source = " . json_encode($md) . ";\n"; + echo "mdFragments.source = " . json_encode($md, JSON_UNESCAPED_UNICODE) . ";\n"; } } } @@ -712,7 +712,7 @@ if (isset($datas) && is_array($datas)) { } } if ($hasData) { - echo "mdFragments.exceptiondata = " . json_encode($md) . ";\n"; + echo "mdFragments.exceptiondata = " . json_encode($md, JSON_UNESCAPED_UNICODE) . ";\n"; echo "window.__hasExceptionData = true;\n"; } } @@ -738,7 +738,7 @@ if (isset($tables) && is_array($tables)) { $md .= "- **{$k}:** `{$val_str}`\n"; } $md .= "\n"; - echo "mdFragments.{$jsKey} = " . json_encode($md) . ";\n"; + echo "mdFragments.{$jsKey} = " . json_encode($md, JSON_UNESCAPED_UNICODE) . ";\n"; echo "window.__hasEnv_{$jsKey} = true;\n"; } }