summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index bdb84ee00d..fc673cace8 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -863,7 +863,10 @@ func (repo *Repository) getUsersWithAccessMode(e Engine, mode AccessMode) (_ []*
// DescriptionHTML does special handles to description and return HTML string.
func (repo *Repository) DescriptionHTML() template.HTML {
- desc, err := markup.RenderDescriptionHTML([]byte(repo.Description), repo.HTMLURL(), repo.ComposeMetas())
+ desc, err := markup.RenderDescriptionHTML(&markup.RenderContext{
+ URLPrefix: repo.HTMLURL(),
+ Metas: repo.ComposeMetas(),
+ }, repo.Description)
if err != nil {
log.Error("Failed to render description for %s (ID: %d): %v", repo.Name, repo.ID, err)
return template.HTML(markup.Sanitize(repo.Description))