func (u *User) AvatarLink() string {
link := u.RelAvatarLink()
if link[0] == '/' && link[1] != '/' {
- return setting.AppUrl + link[1:]
+ return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:]
}
return link
}
<div class="commit-form-wrapper">
- <img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.AvatarLink}}">
+ <img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.RelAvatarLink}}">
<div class="commit-form">
<h3>{{.i18n.Tr "repo.editor.commit_changes"}}</h3>
<div class="field">