From d4f28fd4ad37398d0ef953866943972a1147dc55 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 7 May 2021 17:34:33 +0200 Subject: [PATCH] Fix URL of gitea emoji (#15770) Fixes regression from #15219 --- modules/markup/html.go | 2 +- modules/markup/html_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index 7c4c10ee2..4d1b49e24 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -484,7 +484,7 @@ func createCustomEmoji(alias, class string) *html.Node { } if class != "" { img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)}) - img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/img/emoji/%s.png`, setting.StaticURLPrefix, alias)}) + img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/assets/img/emoji/%s.png`, setting.StaticURLPrefix, alias)}) } span.AppendChild(img) diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index 3425c3d3a..fa8c84860 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -283,7 +283,7 @@ func TestRender_emoji(t *testing.T) { //Text that should be turned into or recognized as emoji test( ":gitea:", - `

:gitea:

`) + `

:gitea:

`) test( "Some text with 😄 in the middle",