mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Remove unnecessary SanitizeHTML from code (#29575)
* "mail/issue/default.tmpl": the body is rendered by backend `markdown.RenderString() HTML`, it has been already sanitized * "repo/settings/webhook/base_list.tmpl": "Description" is prepared by backend `ctx.Tr`, it doesn't need to be sanitized
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{.Body | SanitizeHTML}}
|
||||
{{.Body}}
|
||||
{{end -}}
|
||||
{{- range .ReviewComments}}
|
||||
<hr>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="ui list">
|
||||
<div class="item">
|
||||
{{.Description | SanitizeHTML}}
|
||||
{{.Description}}
|
||||
</div>
|
||||
{{range .Webhooks}}
|
||||
<div class="item truncated-item-container">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{{/* This page should only depend the minimal template functions/variables, to avoid triggering new panics.
|
||||
* base template functions: AppName, AssetUrlPrefix, AssetVersion, AppSubUrl, ThemeName, SanitizeHTML
|
||||
* base template functions: AppName, AssetUrlPrefix, AssetVersion, AppSubUrl, ThemeName
|
||||
* ctx.Locale
|
||||
* .Flash
|
||||
* .ErrorMsg
|
||||
|
Reference in New Issue
Block a user