diff options
author | silverwind <me@silverwind.io> | 2021-05-07 17:34:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 17:34:33 +0200 |
commit | d4f28fd4ad37398d0ef953866943972a1147dc55 (patch) | |
tree | 1d8b2f28d02abedf49fb8bc5eb8cb8dea5312e5c /modules/markup | |
parent | 16034bb61332196a40c01be8bb3fd2d0b48198cf (diff) | |
download | gitea-d4f28fd4ad37398d0ef953866943972a1147dc55.tar.gz gitea-d4f28fd4ad37398d0ef953866943972a1147dc55.zip |
Fix URL of gitea emoji (#15770)
Fixes regression from #15219
Diffstat (limited to 'modules/markup')
-rw-r--r-- | modules/markup/html.go | 2 | ||||
-rw-r--r-- | 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 7c4c10ee22..4d1b49e241 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 3425c3d3a8..fa8c848601 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:", - `<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/img/emoji/gitea.png"/></span></p>`) + `<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/gitea.png"/></span></p>`) test( "Some text with 😄 in the middle", |