mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix wrong usage of PathEscapeSegments in branch list page (#25864)
Before:  emmm, don't know how to write a good title to describe this issue. If you have a good idea, I can change the title. The fix code is copied from L122. Not sure it is right or not. @lunny Maybe `DefaultBranchBranch` is also typo? Two `Branch` in variable name .
This commit is contained in:
		@@ -125,7 +125,7 @@
 | 
				
			|||||||
										{{end}}
 | 
															{{end}}
 | 
				
			||||||
									{{else if and .LatestPullRequest.HasMerged .MergeMovedOn}}
 | 
														{{else if and .LatestPullRequest.HasMerged .MergeMovedOn}}
 | 
				
			||||||
										{{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
 | 
															{{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
 | 
				
			||||||
										<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | PathEscapeSegments}}">
 | 
															<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
 | 
				
			||||||
											<button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{$.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{$.locale.Tr "action.compare_branch"}}{{end}}</button>
 | 
																<button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{$.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{$.locale.Tr "action.compare_branch"}}{{end}}</button>
 | 
				
			||||||
										</a>
 | 
															</a>
 | 
				
			||||||
										{{end}}
 | 
															{{end}}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user