summaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-07 16:44:25 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-07 16:44:25 -0500
commit35977cd34cd635bca7f07ed2eb1fba0df9944e1d (patch)
treef12c39c762ce686e47eae6bf7282d08e12b1e10f /templates/repo/view_file.tmpl
parentabc57b6e439c5ab9c3b6ed2cedeb10d50f5ae619 (diff)
downloadgitea-35977cd34cd635bca7f07ed2eb1fba0df9944e1d.tar.gz
gitea-35977cd34cd635bca7f07ed2eb1fba0df9944e1d.zip
continue work on #255
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 4e2d4fc64c..d33cc95023 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -12,10 +12,10 @@
<strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
{{end}}
{{if not .ReadmeInList}}
- <a class="right" href="{{.RepoLink}}/commits/{{.BranchName}}/{{.TreeName}}">
+ <a class="right" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{.TreeName}}">
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button>
</a>
- <a class="right" href="{{.FileLink}}">
+ <a class="right" href="{{EscapePound .FileLink}}">
<button class="btn btn-medium btn-gray btn-left-radius btn-comb">{{.i18n.Tr "repo.file_raw"}}</button>
</a>
{{end}}
@@ -26,9 +26,9 @@
{{else if not .IsFileText}}
<div class="view-raw">
{{if .IsImageFile}}
- <img src="{{.FileLink}}">
+ <img src="{{EscapePound .FileLink}}">
{{else}}
- <a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a>
+ <a href="{{EscapePound .FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a>
{{end}}
</div>
{{else if .FileSize}}