summaryrefslogtreecommitdiffstats
path: root/templates/repo/search.tmpl
diff options
context:
space:
mode:
authorJonas Franz <info@jonasfranz.software>2018-02-11 20:25:02 +0100
committerLauris BH <lauris@nix.lv>2018-02-11 21:25:02 +0200
commitc0675ef6c29933376bd77b056f55d8e2a788602f (patch)
treec003e80673db5ca1b283d701d0760a2fa1b74eb8 /templates/repo/search.tmpl
parent4e27cc48132c1d59259d2045309a1a3ae7c35f59 (diff)
downloadgitea-c0675ef6c29933376bd77b056f55d8e2a788602f.tar.gz
gitea-c0675ef6c29933376bd77b056f55d8e2a788602f.zip
Escape search query (Backport 1.4) (#3488)
* Escape search query Signed-off-by: Jonas Franz <info@jonasfranz.de> (cherry picked from commit 2970889) * Reordered imports Signed-off-by: Jonas Franz <info@jonasfranz.de>
Diffstat (limited to 'templates/repo/search.tmpl')
-rw-r--r--templates/repo/search.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl
index 19a9d4474c..3ddc5de86c 100644
--- a/templates/repo/search.tmpl
+++ b/templates/repo/search.tmpl
@@ -14,7 +14,7 @@
</div>
{{if .Keyword}}
<h3>
- {{.i18n.Tr "repo.search.results" .Keyword .RepoLink .RepoName | Str2html}}
+ {{.i18n.Tr "repo.search.results" (.Keyword|Escape) .RepoLink .RepoName | Str2html }}
</h3>
<div class="repository search">
{{range $result := .SearchResults}}