From 638262cec38a233ac16ee2f1788634036ab2a3dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 1 Apr 2026 17:05:08 +0200 Subject: [PATCH] markup/goldmark: Clean up test --- markup/goldmark/goldmark_integration_test.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/markup/goldmark/goldmark_integration_test.go b/markup/goldmark/goldmark_integration_test.go index c088201b3..ca750de45 100644 --- a/markup/goldmark/goldmark_integration_test.go +++ b/markup/goldmark/goldmark_integration_test.go @@ -1039,20 +1039,13 @@ foo[^1] and bar[^2] func TestRenderLinkDefaultDangerous(t *testing.T) { t.Parallel() - /* - Content:

Link: Click me - AutoLink: javascript:alert(1) - Image: alt

- */ - files := ` -- content/p1.md -- --- title: "p1" --- Link: [Click me](javascript:alert(1)) -AutoLink: -Image: ![alt](javascript:alert(3)) +Image: ![alt](javascript:alert(2)) -- layouts/all.html -- Content: {{ .Content }} ` @@ -1061,7 +1054,6 @@ Content: {{ .Content }} b.AssertFileContent("public/p1/index.html", `! alert(1)"`, - `! href="javascript:alert(2)"`, - `! alert(3)"`, + `! alert(2)"`, ) } -- 2.39.5