diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 2b4f279cb..ed2162a41 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -79,7 +79,9 @@
- {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
+ {{if not (or .IsMarkup .IsRenderedHTML)}}
+ {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
+ {{end}}
{{if .IsMarkup}}
{{if .FileContent}}{{.FileContent | Safe}}{{end}}