fix titleize()

This commit is contained in:
fiatjaf
2023-09-13 21:26:39 -03:00
parent daf83b136c
commit 700d12eb27
2 changed files with 2 additions and 2 deletions

View File

@@ -328,7 +328,7 @@ func render(w http.ResponseWriter, r *http.Request) {
"event": event,
"eventJSON": string(eventJSON),
"content": content,
"titleizedContent": titleize(content),
"titleizedContent": titleize(event.Content),
"textImageURL": textImageURL,
"videoType": videoType,
"image": image,

View File

@@ -362,7 +362,7 @@ func titleize(s string) string {
if len(s) <= 65 {
return "\"" + s + "\""
}
return "\"" + s[:65] + "...\""
return "\"" + s[:64] + "\""
}
func unique(strSlice []string) []string {