mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-10 10:50:21 +02:00
Return the full rejection message and errors in flash errors (#13221)
Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
1 parent
48a80096bb
commit
965861043a
9 files changed
+128
-25
No files matched your search
@@ -41,12 +41,6 @@ func IsValidSlackChannel(channelName string) bool {
|
||||
|
||||
// SanitizeFlashErrorString will sanitize a flash error string
|
||||
func SanitizeFlashErrorString(x string) string {
|
||||
runes := []rune(x)
|
||||
|
||||
if len(runes) > 512 {
|
||||
x = "..." + string(runes[len(runes)-512:])
|
||||
}
|
||||
|
||||
return strings.ReplaceAll(html.EscapeString(x), "\n", "<br>")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user