Skip to content

Commit 57d58e4

Browse files
committed
Fix URL of gitea emoji
Fixes regression from go-gitea#15219
1 parent 16034bb commit 57d58e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/markup/html.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ func createCustomEmoji(alias, class string) *html.Node {
484484
}
485485
if class != "" {
486486
img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)})
487-
img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/img/emoji/%s.png`, setting.StaticURLPrefix, alias)})
487+
img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/assets/img/emoji/%s.png`, setting.StaticURLPrefix, alias)})
488488
}
489489

490490
span.AppendChild(img)

modules/markup/html_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ func TestRender_emoji(t *testing.T) {
283283
//Text that should be turned into or recognized as emoji
284284
test(
285285
":gitea:",
286-
`<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/img/emoji/gitea.png"/></span></p>`)
286+
`<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/gitea.png"/></span></p>`)
287287

288288
test(
289289
"Some text with 😄 in the middle",

0 commit comments

Comments
 (0)