diff options
author | Odin Ugedal <odin@ugedal.com> | 2016-03-15 11:31:35 +0100 |
---|---|---|
committer | Odin Ugedal <odin@ugedal.com> | 2016-03-15 11:36:23 +0100 |
commit | ac390d28b8d3b345d3a21f2c8f1da3119209a2cf (patch) | |
tree | a3bf88eb2acbbc2725c8ad0753b5efa3fe4cb314 /templates/repo/pulls | |
parent | 9df5c39bca6fb397449525b0f1eb0d24d993439f (diff) | |
download | gitea-ac390d28b8d3b345d3a21f2c8f1da3119209a2cf.tar.gz gitea-ac390d28b8d3b345d3a21f2c8f1da3119209a2cf.zip |
Fix problems with '#' in branchname
Add proper escaping of '#' in branchname in compare when doing pull
requests. This addresses issue #2822.
Diffstat (limited to 'templates/repo/pulls')
-rw-r--r-- | templates/repo/pulls/compare.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index 0d7b6f9b55..7069fe3f05 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -21,7 +21,7 @@ </div> <div class="scrolling menu"> {{range .Branches}} - <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{$.HeadBranch}}">{{.}}</div> + <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{EscapePound .}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound $.HeadBranch}}">{{.}}</div> {{end}} </div> </div> @@ -39,7 +39,7 @@ </div> <div class="scrolling menu"> {{range .HeadBranches}} - <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{.}}">{{.}}</div> + <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{EscapePound $.BaseBranch}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound .}}">{{.}}</div> {{end}} </div> </div> |