Skip to content

Commit 0e46499

Browse files
authored
Do not emit ambiguous character warning on rendered pages (#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 #20999 Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent 181f4bf commit 0e46499

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/repo/view_file.tmpl

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
</div>
5959
</h4>
6060
<div class="ui attached table unstackable segment">
61-
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
61+
{{if not (or .IsMarkup .IsRenderedHTML)}}
62+
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
63+
{{end}}
6264
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsRenderedHTML}} plain-text{{else if .IsTextSource}} code-view{{end}}">
6365
{{if .IsMarkup}}
6466
{{if .FileContent}}{{.FileContent | Safe}}{{end}}

0 commit comments

Comments
 (0)