mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 12:48:37 +00:00
Refactor Safe modifier (#29392)
After this PR: no need to play with the Safe/Escape tricks anymore. See the changes for more details.
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
|
||||
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
|
||||
{{if .IsMarkup}}
|
||||
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
|
||||
{{if .FileContent}}{{.FileContent | SafeHTML}}{{end}}
|
||||
{{else if .IsPlainText}}
|
||||
<pre>{{if .FileContent}}{{.FileContent | Safe}}{{end}}</pre>
|
||||
<pre>{{if .FileContent}}{{.FileContent | SafeHTML}}{{end}}</pre>
|
||||
{{else if not .IsTextFile}}
|
||||
<div class="view-raw">
|
||||
{{if .IsImageFile}}
|
||||
|
Reference in New Issue
Block a user