fix: Invalid UTF-8 commit messages in JSON API responses (#37542)

This commit is contained in:
Nicolas authored and GitHub committed 2026-05-07 16:19:45 +02:00
1 parent 2200ed7499
commit c9b9e376fb
54 files changed
+221 -215

No files matched your search

+1 -2
View File
@@ -18,8 +18,7 @@
<meta property="og:title" content="{{.Title}}">
<meta property="og:url" content="{{ctx.AppFullLink $.Link}}">
{{if and .PageIsDiff .Commit}}
{{- $commitMessageParts := StringUtils.Cut .Commit.Message "\n" -}}
{{- $commitMessageBody := index $commitMessageParts 1 -}}
{{- $commitMessageBody := .Commit.MessageBody -}}
{{- if $commitMessageBody -}}
<meta property="og:description" content="{{StringUtils.EllipsisString $commitMessageBody 300}}">
{{- end -}}