修复模板注入问题

This commit is contained in:
dragon
2025-04-15 17:38:45 +08:00
parent 3f63988e2d
commit 2e7e301858
3 changed files with 14 additions and 8 deletions

View File

@@ -5,11 +5,11 @@
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{{ if eq .code 404 }}<title>404 Not Found</title>{{ else }}<title>500 Unknown Error</title>{{ end }}
{{ if eq .Code 404 }}<title>404 Not Found</title>{{ else }}<title>500 Unknown Error</title>{{ end }}
</head>
<Body>
<div style="text-align: center;">
{{ if eq .code 404 }}<h1>404 Not Found</h1>{{ else }}<h1>500 Unknown Error</h1>{{ end }}
{{ if eq .Code 404 }}<h1>404 Not Found</h1>{{ else }}<h1>500 Unknown Error</h1>{{ end }}
</div>
<hr>
<div style="text-align: center;">Gitea Pages</div>