Skip to content

Commit 17a7797

Browse files
authored
Fix incorrect asset URL (#15805)
Fixes another regression from #15219.
1 parent 2e0f315 commit 17a7797

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/templates/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -766,7 +766,7 @@ func ReactionToEmoji(reaction string) template.HTML {
766
if val != nil {
766
if val != nil {
767
return template.HTML(val.Emoji)
767
return template.HTML(val.Emoji)
768
}
768
}
769-
return template.HTML(fmt.Sprintf(`<img alt=":%s:" src="%s/img/emoji/%s.png"></img>`, reaction, setting.StaticURLPrefix, reaction))
769+
return template.HTML(fmt.Sprintf(`<img alt=":%s:" src="%s/assets/img/emoji/%s.png"></img>`, reaction, setting.StaticURLPrefix, reaction))
770
}
770
}
771

771

772
// RenderNote renders the contents of a git-notes file as a commit message.
772
// RenderNote renders the contents of a git-notes file as a commit message.

routers/routes/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -173,7 +173,7 @@ func WebRoutes() *web.Route {
173

173

174
// this png is very likely to always be below the limit for gzip so it doesn't need to pass through gzip
174
// this png is very likely to always be below the limit for gzip so it doesn't need to pass through gzip
175
routes.Get("/apple-touch-icon.png", func(w http.ResponseWriter, req *http.Request) {
175
routes.Get("/apple-touch-icon.png", func(w http.ResponseWriter, req *http.Request) {
176-
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "img/apple-touch-icon.png"), 301)
176+
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/apple-touch-icon.png"), 301)
177
})
177
})
178

178

179
gob.Register(&u2f.Challenge{})
179
gob.Register(&u2f.Challenge{})

0 commit comments

Comments
 (0)