forgejo/templates/code/searchcombo.tmpl
wxiaoguang 70f3c32b91
Remove incorrect and unnecessary Escape from templates (#29394)
Follow #29165

* some of them are incorrect, which would lead to double escaping (eg:
`(print (Escape $.RepoLink)`)
* other of them are not necessary, because `Tr` handles strings&HTML
automatically

Suggest to review by "unified view":
https://github.com/go-gitea/gitea/pull/29394/files?diff=unified&w=0

(cherry picked from commit d2f6588b66549b33adf8bac7044d03c89d668470)

Conflicts:
	templates/code/searchcombo.tmpl
	templates/mail/auth/register_notify.tmpl
	templates/mail/issue/default.tmpl
	templates/repo/code/recently_pushed_new_branches.tmpl
	templates/repo/search.tmpl
	templates/repo/settings/protected_branch.tmpl
	templates/user/auth/activate.tmpl
	templates/user/auth/forgot_passwd.tmpl
	templates/user/dashboard/feeds.tmpl
	context
2024-02-26 22:30:27 +01:00

18 lines
491 B
Go HTML Template

{{template "code/searchform" .}}
<div class="divider"></div>
<div class="ui user list">
{{if .CodeIndexerUnavailable}}
<div class="ui error message">
<p>{{ctx.Locale.Tr "explore.code_search_unavailable"}}</p>
</div>
{{else if .SearchResults}}
<h3>
{{ctx.Locale.Tr "explore.code_search_results" .Keyword}}
</h3>
{{template "code/searchresults" .}}
{{else if .Keyword}}
<div>{{ctx.Locale.Tr "explore.code_no_results"}}</div>
{{end}}
</div>
{{template "base/paginate" .}}