From 0ce233bdede3348504510f9880268c9b2f848061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 15:56:25 +0000 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E7=B4=A2=E9=A1=B5=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=BF=9D=E7=95=99=20back=20=E4=B8=8A=E4=B8=8B=E6=96=87?= =?UTF-8?q?=EF=BC=88=E8=A1=A5=E6=8A=A4=E6=A0=8F=E6=B5=8B=E8=AF=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Feature/AdminPlatformLeadIndexBackLinkNotEscapedTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Feature/AdminPlatformLeadIndexBackLinkNotEscapedTest.php b/tests/Feature/AdminPlatformLeadIndexBackLinkNotEscapedTest.php index 7c550f4..befcdd8 100644 --- a/tests/Feature/AdminPlatformLeadIndexBackLinkNotEscapedTest.php +++ b/tests/Feature/AdminPlatformLeadIndexBackLinkNotEscapedTest.php @@ -38,6 +38,8 @@ class AdminPlatformLeadIndexBackLinkNotEscapedTest extends TestCase $res->assertSee('← 返回上一页(保留上下文)', false); $res->assertSee('href="' . $back . '"', false); - $res->assertDontSee('&', false); + + // 页面其它位置(例如表单隐藏字段)可能会出现 &,这里只要求“返回上一页”这个链接不被转义。 + $res->assertDontSee('href="' . str_replace('&', '&', $back) . '"', false); } }