diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-02-18 09:48:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 01:48:59 +0000 |
commit | a784ed3d6c6946fd9bf95f2e910f52f549326fe2 (patch) | |
tree | 9946c734e07c65f193459febdc9c9d7ef91cbc1d /templates/admin | |
parent | d73223bfc6fcabdfb4ca284729ccead5ba228728 (diff) | |
download | gitea-a784ed3d6c6946fd9bf95f2e910f52f549326fe2.tar.gz gitea-a784ed3d6c6946fd9bf95f2e910f52f549326fe2.zip |
Use "Safe" modifier for manually constructed safe HTML strings in templates (#29227)
Follow #29165. These HTML strings are safe to be rendered directly, to
avoid double-escaping.
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/packages/list.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/repo/list.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/stacktrace.tmpl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index 5cfd9ddefa..04f76748d0 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -88,7 +88,7 @@ {{ctx.Locale.Tr "packages.settings.delete"}} </div> <div class="content"> - {{ctx.Locale.Tr "packages.settings.delete.notice" `<span class="name"></span>` `<span class="dataVersion"></span>` | Safe}} + {{ctx.Locale.Tr "packages.settings.delete.notice" (`<span class="name"></span>`|Safe) (`<span class="dataVersion"></span>`|Safe)}} </div> {{template "base/modal_actions_confirm" .}} </div> diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index fdba0734a2..c7a6ec7e4e 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -101,7 +101,7 @@ </div> <div class="content"> <p>{{ctx.Locale.Tr "repo.settings.delete_desc"}}</p> - {{ctx.Locale.Tr "repo.settings.delete_notices_2" `<span class="name"></span>` | Safe}}<br> + {{ctx.Locale.Tr "repo.settings.delete_notices_2" (`<span class="name"></span>`|Safe)}}<br> {{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}<br> </div> {{template "base/modal_actions_confirm" .}} diff --git a/templates/admin/stacktrace.tmpl b/templates/admin/stacktrace.tmpl index 894e41f8d7..aa5e810cd7 100644 --- a/templates/admin/stacktrace.tmpl +++ b/templates/admin/stacktrace.tmpl @@ -39,7 +39,7 @@ {{ctx.Locale.Tr "admin.monitor.process.cancel"}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "admin.monitor.process.cancel_notices" `<span class="name"></span>` | Safe}}</p> + <p>{{ctx.Locale.Tr "admin.monitor.process.cancel_notices" (`<span class="name"></span>`|Safe)}}</p> <p>{{ctx.Locale.Tr "admin.monitor.process.cancel_desc"}}</p> </div> {{template "base/modal_actions_confirm" .}} |