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); } }