mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Improve user search display name (#29002)
I tripped over this strange method and I don't think we need that workaround to fix the value. old:  new:  --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -11,14 +11,6 @@ import ( | ||||
| 	"code.gitea.io/gitea/modules/setting" | ||||
| ) | ||||
|  | ||||
| // RemoveUsernameParameterSuffix returns the username parameter without the (fullname) suffix - leaving just the username | ||||
| func RemoveUsernameParameterSuffix(name string) string { | ||||
| 	if index := strings.Index(name, " ("); index >= 0 { | ||||
| 		name = name[:index] | ||||
| 	} | ||||
| 	return name | ||||
| } | ||||
|  | ||||
| // SanitizeFlashErrorString will sanitize a flash error string | ||||
| func SanitizeFlashErrorString(x string) string { | ||||
| 	return strings.ReplaceAll(html.EscapeString(x), "\n", "<br>") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user