aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-15 14:36:58 -0400
committerUnknwon <u@gogs.io>2016-03-15 14:36:58 -0400
commita04596659b93e4120311c442ec60c1249367c62c (patch)
tree843c36658358720496733105520d04a6ff80d7be
parent149d62a648d5b852e43125834ed9b1cb6b49bdc0 (diff)
parentc9321550e0e281c0ceebaae8db35b2bc796a71bd (diff)
Merge pull request #2830 from odinuge/branchname-compare
Fix problems with '#' in branchname
-rw-r--r--templates/repo/issue/new_form.tmpl2
-rw-r--r--templates/repo/pulls/compare.tmpl4
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index b77cfb2c..77c6d126 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -1,4 +1,4 @@
-<form class="ui comment form grid" action="{{.Link}}" method="post">
+<form class="ui comment form grid" action="{{EscapePound .Link}}" method="post">
{{.CsrfTokenHtml}}
{{if .Flash}}
<div class="sixteen wide column">
diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl
index 0d7b6f9b..7069fe3f 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>