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.
This commit is contained in:
wxiaoguang authored and GitHub committed 2024-02-18 01:48:59 +00:00
1 parent d73223bfc6
commit a784ed3d6c
12 files changed
+15 -15

No files matched your search

+1 -1
View File
@@ -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>