File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 11// Copyright 2020 The Gitea Authors. All rights reserved.
22// SPDX-License-Identifier: MIT
33
4-
54//go:build vendor
65
76package main
Original file line number Diff line number Diff line change 88
99 activities_model "code.gitea.io/gitea/models/activities"
1010 "code.gitea.io/gitea/modules/context"
11+ "code.gitea.io/gitea/modules/markup"
12+ "code.gitea.io/gitea/modules/markup/markdown"
1113
1214 "github.com/gorilla/feeds"
1315)
@@ -39,10 +41,22 @@ func showUserFeed(ctx *context.Context, formatType string) {
3941 return
4042 }
4143
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+
4256 feed := & feeds.Feed {
4357 Title : ctx .Tr ("home.feed_of" , ctx .ContextUser .DisplayName ()),
4458 Link : & feeds.Link {Href : ctx .ContextUser .HTMLURL ()},
45- Description : ctx . ContextUser . Description ,
59+ Description : ctxUserDescription ,
4660 Created : time .Now (),
4761 }
4862
You can’t perform that action at this time.
0 commit comments