diff --git a/service/site-service.go b/service/site-service.go index 9a37bd3..c223292 100644 --- a/service/site-service.go +++ b/service/site-service.go @@ -52,11 +52,13 @@ func siteAccess(uri *string) error { }) //保持公平,长度限制 - if len(title) > 20 { - title = title[:20] + str := []rune(title) + if len(str) > 25 { + title = string(str[:25]) } - if len(description) > 200 { - description = description[:200] + str2 := []rune(description) + if len(str2) > 200 { + description = string(str2[:200]) } if title != "" {