File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright 2020 The Gitea Authors. All rights reserved.
2
2
// SPDX-License-Identifier: MIT
3
3
4
-
5
4
//go:build vendor
6
5
7
6
package main
Original file line number Diff line number Diff line change 8
8
9
9
activities_model "code.gitea.io/gitea/models/activities"
10
10
"code.gitea.io/gitea/modules/context"
11
+ "code.gitea.io/gitea/modules/markup"
12
+ "code.gitea.io/gitea/modules/markup/markdown"
11
13
12
14
"github.com/gorilla/feeds"
13
15
)
@@ -39,10 +41,22 @@ func showUserFeed(ctx *context.Context, formatType string) {
39
41
return
40
42
}
41
43
44
+ ctxUserDescription , err := markdown .RenderString (& markup.RenderContext {
45
+ Ctx : ctx ,
46
+ URLPrefix : ctx .ContextUser .HTMLURL (),
47
+ Metas : map [string ]string {
48
+ "user" : ctx .ContextUser .GetDisplayName (),
49
+ },
50
+ }, ctx .ContextUser .Description )
51
+ if err != nil {
52
+ ctx .ServerError ("RenderString" , err )
53
+ return
54
+ }
55
+
42
56
feed := & feeds.Feed {
43
57
Title : ctx .Tr ("home.feed_of" , ctx .ContextUser .DisplayName ()),
44
58
Link : & feeds.Link {Href : ctx .ContextUser .HTMLURL ()},
45
- Description : ctx . ContextUser . Description ,
59
+ Description : ctxUserDescription ,
46
60
Created : time .Now (),
47
61
}
48
62
You can’t perform that action at this time.
0 commit comments