Use EscapePound in link hrefs in diff/file views

This commit is contained in:
Vladimir Vissoultchev 2015-07-28 19:51:40 +03:00
parent 43bfee0d48
commit 2bb1fb8f44
3 changed files with 13 additions and 12 deletions

View file

@ -13,11 +13,11 @@
{{end}}
{{if not .ReadmeInList}}
{{if not .IsCommit}}
<a class="right" href="{{.RepoLink}}/src/{{.CommitId}}/{{.TreeName}}">
<a class="right" href="{{.RepoLink}}/src/{{.CommitId}}/{{EscapePound .TreeName}}">
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_permalink"}}</button>
</a>
{{end}}
<a class="right" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{.TreeName}}">
<a class="right" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{EscapePound .TreeName}}">
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button>
</a>
<a class="right" href="{{EscapePound .FileLink}}">
@ -47,4 +47,4 @@
</table>
{{end}}
</div>
</div>
</div>