Added rel="noopener" to target="_blank" hrefs (#327)
* Added rel="noopener" to target="_blank" hrefs * Replaced gogs.io/docs with docs.gitea.io
This commit is contained in:
parent
1ae6ccb5f1
commit
5ab85372da
36 changed files with 144 additions and 146 deletions
|
@ -499,7 +499,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">%[1]s</a>`, s)
|
||||
return fmt.Sprintf(`<a href="%[1]s" target="_blank" rel="noopener">%[1]s</a>`, s)
|
||||
}
|
||||
return template.HTML(descPattern.ReplaceAllStringFunc(markdown.Sanitizer.Sanitize(repo.Description), sanitize))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue