diff options
author | cezar97 <cezar97@protonmail.com> | 2018-07-04 02:52:36 +0300 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-07-03 19:52:36 -0400 |
commit | 51ba3df5ff5b58a77c31bcda9a8efd3cdafa1d99 (patch) | |
tree | cda666fa4f35b1b7e57f8e734764cccd4988a7fe /models/repo.go | |
parent | 4b654ad17f50a441049c208e5011d0799522592b (diff) | |
download | gitea-51ba3df5ff5b58a77c31bcda9a8efd3cdafa1d99.tar.gz gitea-51ba3df5ff5b58a77c31bcda9a8efd3cdafa1d99.zip |
Add `noreferrer` to rel='noopener` for <a> tags (#4328)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go index d1cc290c44..52325f2623 100644 --- a/models/repo.go +++ b/models/repo.go @@ -781,7 +781,7 @@ var ( // DescriptionHTML does special handles to description and return HTML string. func (repo *Repository) DescriptionHTML() template.HTML { sanitize := func(s string) string { - return fmt.Sprintf(`<a href="%[1]s" target="_blank" rel="noopener">%[1]s</a>`, s) + return fmt.Sprintf(`<a href="%[1]s" target="_blank" rel="noopener noreferrer">%[1]s</a>`, s) } return template.HTML(descPattern.ReplaceAllStringFunc(markup.Sanitize(repo.Description), sanitize)) } |