(title string)
| 65 | } |
| 66 | |
| 67 | func UrlTitle(title string) (text string) { |
| 68 | title = convertChinese(title) |
| 69 | title = clearEmoji(title) |
| 70 | title = slugify.Slugify(title) |
| 71 | title = url.QueryEscape(title) |
| 72 | title = cutLongTitle(title) |
| 73 | if len(title) == 0 { |
| 74 | title = "topic" |
| 75 | } |
| 76 | return title |
| 77 | } |
| 78 | |
| 79 | func clearEmoji(s string) string { |
| 80 | var ret strings.Builder |