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/repo/commit_page.tmpl | |
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/repo/commit_page.tmpl')
-rw-r--r-- | templates/repo/commit_page.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 01fa45babe..ce9fcecd8b 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -88,7 +88,7 @@ {{.CsrfTokenHtml}} <div class="field"> <label> - {{ctx.Locale.Tr "repo.branch.new_branch_from" `<span class="text" id="modal-create-branch-from-span"></span>` | Safe}} + {{ctx.Locale.Tr "repo.branch.new_branch_from" (`<span class="text" id="modal-create-branch-from-span"></span>`|Safe)}} </label> </div> <div class="required field"> @@ -113,7 +113,7 @@ <input type="hidden" name="create_tag" value="true"> <div class="field"> <label> - {{ctx.Locale.Tr "repo.tag.create_tag_from" `<span class="text" id="modal-create-tag-from-span"></span>` | Safe}} + {{ctx.Locale.Tr "repo.tag.create_tag_from" (`<span class="text" id="modal-create-tag-from-span"></span>`|Safe)}} </label> </div> <div class="required field"> |