Return the full rejection message and errors in flash errors (#13221)

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2020-10-21 00:50:10 +01:00 committed by GitHub
parent 48a80096bb
commit 965861043a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 128 additions and 25 deletions

View file

@ -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>")
}