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/org | |
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/org')
-rw-r--r-- | templates/org/member/members.tmpl | 4 | ||||
-rw-r--r-- | templates/org/team/members.tmpl | 2 | ||||
-rw-r--r-- | templates/org/team/sidebar.tmpl | 2 | ||||
-rw-r--r-- | templates/org/team/teams.tmpl | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index e4ddb69805..03509ec93e 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -73,7 +73,7 @@ {{ctx.Locale.Tr "org.members.leave"}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p> + <p>{{ctx.Locale.Tr "org.members.leave.detail" (`<span class="dataOrganizationName"></span>`|Safe)}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> @@ -82,7 +82,7 @@ {{ctx.Locale.Tr "org.members.remove"}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p> + <p>{{ctx.Locale.Tr "org.members.remove.detail" (`<span class="name"></span>`|Safe) (`<span class="dataOrganizationName"></span>`|Safe)}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index da63d82967..dd4ece1433 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -81,7 +81,7 @@ {{ctx.Locale.Tr "org.members.remove"}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p> + <p>{{ctx.Locale.Tr "org.members.remove.detail" (`<span class="name"></span>`|Safe) (`<span class="dataTeamName"></span>`|Safe)}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 29e7cf7cdd..37550ab71f 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -88,7 +88,7 @@ {{ctx.Locale.Tr "org.teams.leave"}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p> + <p>{{ctx.Locale.Tr "org.teams.leave.detail" (`<span class="name"></span>`|Safe)}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index f4ceada2a7..b518d7d9d7 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -49,7 +49,7 @@ {{ctx.Locale.Tr "org.teams.leave"}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p> + <p>{{ctx.Locale.Tr "org.teams.leave.detail" (`<span class="name"></span>`|Safe)}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> |