Skip to content

Commit 6c759fa

Browse files
committed
Do not emit ambiguous character warning on rendered pages (go-gitea#22016)
Backport go-gitea#22016 The real sensitivity of ambiguous characters is in source code - therefore warning about them in rendered pages causes too many warnings. Therefore simply remove the warning on rendered pages. The escape button will remain available and it is present on the view source page. Fix go-gitea#20999 Signed-off-by: Andrew Thornton <[email protected]>
1 parent da956b8 commit 6c759fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/repo/view_file.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
</div>
8080
</h4>
8181
<div class="ui attached table unstackable segment">
82-
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
82+
{{if not (or .IsMarkup .IsRenderedHTML)}}
83+
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
84+
{{end}}
8385
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsRenderedHTML}} plain-text{{else if .IsTextSource}} code-view{{end}}">
8486
{{if .IsMarkup}}
8587
{{if .FileContent}}{{.FileContent | Safe}}{{end}}

0 commit comments

Comments
 (0)