summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-26 16:16:53 +0800
committerzeripath <art27@cantab.net>2020-01-26 08:16:53 +0000
commit16dfd9ffbe5d9653d75997303d88872462f10bfe (patch)
treef3ff03bc44fdd41ef598a1fffda3d77542657d36 /templates
parent16f7b43903f9d63c6a053ed22b7ab59bd5381143 (diff)
downloadgitea-16dfd9ffbe5d9653d75997303d88872462f10bfe.tar.gz
gitea-16dfd9ffbe5d9653d75997303d88872462f10bfe.zip
Sanitize credentials in mirror form (#9975) (#9991)
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/header.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index b1b31183c4..b3757b2764 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -14,7 +14,7 @@
{{if and .RelAvatarLink .IsPrivate}}<i class="mega-octicon octicon-lock"></i>{{end}}
{{if .IsTemplate}}<i class="icon fa-copy"></i>{{end}}
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
- {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{MirrorAddress $.Mirror}}">{{MirrorAddress $.Mirror}}</a></div>{{end}}
+ {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
{{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
</div>