Skip to content

Commit 638262c

Browse files
committed
markup/goldmark: Clean up test
1 parent 397980a commit 638262c

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

markup/goldmark/goldmark_integration_test.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,20 +1039,13 @@ foo[^1] and bar[^2]
10391039
func TestRenderLinkDefaultDangerous(t *testing.T) {
10401040
t.Parallel()
10411041

1042-
/*
1043-
Content: <p>Link: <a href="javascript:alert(1)">Click me</a>
1044-
AutoLink: <a href="">javascript:alert(1)</a>
1045-
Image: <img src="javascript:alert(1)" alt="alt"></p>
1046-
*/
1047-
10481042
files := `
10491043
-- content/p1.md --
10501044
---
10511045
title: "p1"
10521046
---
10531047
Link: [Click me](&#106;avascript:alert(1))
1054-
AutoLink: <javascript:alert(2)>
1055-
Image: ![alt](&#106;avascript:alert(3))
1048+
Image: ![alt](&#106;avascript:alert(2))
10561049
-- layouts/all.html --
10571050
Content: {{ .Content }}
10581051
`
@@ -1061,7 +1054,6 @@ Content: {{ .Content }}
10611054

10621055
b.AssertFileContent("public/p1/index.html",
10631056
`! alert(1)"`,
1064-
`! href="javascript:alert(2)"`,
1065-
`! alert(3)"`,
1057+
`! alert(2)"`,
10661058
)
10671059
}

0 commit comments

Comments
 (0)