Skip to content

Commit c50d598

Browse files
committed
#3577 incorrect URL produced by AvatarLink
1 parent b3d9ca4 commit c50d598

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func (u *User) RelAvatarLink() string {
271271
func (u *User) AvatarLink() string {
272272
link := u.RelAvatarLink()
273273
if link[0] == '/' && link[1] != '/' {
274-
return setting.AppUrl + link[1:]
274+
return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:]
275275
}
276276
return link
277277
}

templates/repo/editor/commit_form.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="commit-form-wrapper">
2-
<img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.AvatarLink}}">
2+
<img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.RelAvatarLink}}">
33
<div class="commit-form">
44
<h3>{{.i18n.Tr "repo.editor.commit_changes"}}</h3>
55
<div class="field">

0 commit comments

Comments
 (0)