forked from NYANDEV/forgejo
* Return the full rejection message and errors in flash errors (#13221) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update routers/repo/pull.go Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
ba97c0e98b
commit
198e57bc37
9 changed files with 128 additions and 25 deletions
|
@ -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>")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue