1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-14 14:37:20 +00:00

Fix rendered wiki page link (#31398) (#31407)

Backport #31398

Fix #31395
This commit is contained in:
wxiaoguang
2024-06-19 11:23:24 +08:00
committed by GitHub
parent e8e43a7ee4
commit 042e9fcd81
11 changed files with 62 additions and 78 deletions

View File

@ -174,7 +174,7 @@ func TestRenderMarkdownToHtml(t *testing.T) {
<a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a>
<a href="/file.bin" rel="nofollow">local link</a>
<a href="https://example.com" rel="nofollow">remote link</a>
<a href="/src/file.bin" rel="nofollow">local link</a>
<a href="/file.bin" rel="nofollow">local link</a>
<a href="https://example.com" rel="nofollow">remote link</a>
<a href="/image.jpg" target="_blank" rel="nofollow noopener"><img src="/image.jpg" alt="local image"/></a>
<a href="https://example.com/image.jpg" target="_blank" rel="nofollow noopener"><img src="https://example.com/image.jpg" alt="remote image"/></a>
@ -190,7 +190,7 @@ com 88fc37a3c0a4dda553bdcfc80c178a58247f42fb mit
#123
space</p>
`
assert.EqualValues(t, expected, RenderMarkdownToHtml(context.Background(), testInput()))
assert.Equal(t, expected, string(RenderMarkdownToHtml(context.Background(), testInput())))
}
func TestRenderLabels(t *testing.T) {