aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-12-18 12:20:37 +0800
committerGitHub <noreply@github.com>2023-12-18 12:20:37 +0800
commita3f403f438e7f5b5dca3a5042fae8e68a896b1e7 (patch)
tree4d3811eec8e0ac9d1745c6e733d29e5a31cb6739 /templates/repo/view_file.tmpl
parent8ee1ed877b0207d9d8733ac32270325c54659909 (diff)
downloadgitea-a3f403f438e7f5b5dca3a5042fae8e68a896b1e7.tar.gz
gitea-a3f403f438e7f5b5dca3a5042fae8e68a896b1e7.zip
Add option to disable ambiguous unicode characters detection (#28454) (#28499)
Backport #28454 (the only conflict is caused by some comments) * Close #24483 * Close #28123 * Close #23682 * Close #23149
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 0064da9632..f377d4d722 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -69,9 +69,9 @@
{{end}}
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextSource}} code-view{{end}}">
{{if .IsMarkup}}
- {{if .FileContent}}{{.FileContent | Safe}}{{end}}
+ {{if .FileContent}}{{.FileContent}}{{end}}
{{else if .IsPlainText}}
- <pre>{{if .FileContent}}{{.FileContent | Safe}}{{end}}</pre>
+ <pre>{{if .FileContent}}{{.FileContent}}{{end}}</pre>
{{else if not .IsTextSource}}
<div class="view-raw">
{{if .IsImageFile}}
@@ -109,7 +109,7 @@
{{if $.EscapeStatus.Escaped}}
<td class="lines-escape">{{if (index $.LineEscapeStatus $idx).Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{if (index $.LineEscapeStatus $idx).HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{if (index $.LineEscapeStatus $idx).HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}"></button>{{end}}</td>
{{end}}
- <td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$code | Safe}}</code></td>
+ <td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$code}}</code></td>
</tr>
{{end}}
</tbody>