aboutsummaryrefslogtreecommitdiff
path: root/templates/base
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-17 08:16:27 -0500
committerUnknwon <u@gogs.io>2017-02-17 08:16:27 -0500
commit57cb23ac81dd43148d5e04618e780489216e49bb (patch)
tree3fb6ac4e16e01f9cf3fb43b0ca507aa0d4493155 /templates/base
parent5155f026b4d6a66eb58f4dba371c047fbee932e5 (diff)
Security: fix XSS attack on alert
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/alert.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl
index 8d05b882..61b99486 100644
--- a/templates/base/alert.tmpl
+++ b/templates/base/alert.tmpl
@@ -1,15 +1,15 @@
{{if .Flash.ErrorMsg}}
<div class="ui negative message">
- <p>{{.Flash.ErrorMsg | Safe}}</p>
+ <p>{{.Flash.ErrorMsg | Str2html}}</p>
</div>
{{end}}
{{if .Flash.SuccessMsg}}
<div class="ui positive message">
- <p>{{.Flash.SuccessMsg | Safe}}</p>
+ <p>{{.Flash.SuccessMsg | Str2html}}</p>
</div>
{{end}}
{{if .Flash.InfoMsg}}
<div class="ui info message">
- <p>{{.Flash.InfoMsg | Safe}}</p>
+ <p>{{.Flash.InfoMsg | Str2html}}</p>
</div>
{{end}}