mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	[GITEA] Improve HTML title on repositories (squash) do not double escape
(cherry picked from commit22882fe25c) (cherry picked from commit63e99df3d1) (cherry picked from commitb65d777bc7) (cherry picked from commit2961f4f632) (cherry picked from commitf7f723628c)
This commit is contained in:
		
					parent
					
						
							
								6c7f16346f
							
						
					
				
			
			
				commit
				
					
						f834957182
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -165,7 +165,7 @@ func renderDirectory(ctx *context.Context, treeLink string) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ctx.Repo.TreePath != "" {
 | 
						if ctx.Repo.TreePath != "" {
 | 
				
			||||||
		ctx.Data["HideRepoInfo"] = true
 | 
							ctx.Data["HideRepoInfo"] = true
 | 
				
			||||||
		ctx.Data["Title"] = ctx.Tr("repo.file.title", ctx.Repo.Repository.Name+"/"+util.PathEscapeSegments(ctx.Repo.TreePath), ctx.Repo.RefName)
 | 
							ctx.Data["Title"] = ctx.Tr("repo.file.title", ctx.Repo.Repository.Name+"/"+ctx.Repo.TreePath, ctx.Repo.RefName)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	subfolder, readmeFile, err := findReadmeFileInEntries(ctx, entries, true)
 | 
						subfolder, readmeFile, err := findReadmeFileInEntries(ctx, entries, true)
 | 
				
			||||||
| 
						 | 
					@ -344,7 +344,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	defer dataRc.Close()
 | 
						defer dataRc.Close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ctx.Data["Title"] = ctx.Tr("repo.file.title", ctx.Repo.Repository.Name+"/"+util.PathEscapeSegments(ctx.Repo.TreePath), ctx.Repo.RefName)
 | 
						ctx.Data["Title"] = ctx.Tr("repo.file.title", ctx.Repo.Repository.Name+"/"+ctx.Repo.TreePath, ctx.Repo.RefName)
 | 
				
			||||||
	ctx.Data["FileIsSymlink"] = entry.IsLink()
 | 
						ctx.Data["FileIsSymlink"] = entry.IsLink()
 | 
				
			||||||
	ctx.Data["FileName"] = blob.Name()
 | 
						ctx.Data["FileName"] = blob.Name()
 | 
				
			||||||
	ctx.Data["RawFileLink"] = rawLink + "/" + util.PathEscapeSegments(ctx.Repo.TreePath)
 | 
						ctx.Data["RawFileLink"] = rawLink + "/" + util.PathEscapeSegments(ctx.Repo.TreePath)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue