Fix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize (#29653)

Fix #29506
pull/29650/head^2
yp05327 8 months ago committed by GitHub
parent f86e9a0367
commit 9dc8a6336e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      modules/markup/csv/csv.go

@ -93,8 +93,10 @@ func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Wri
if _, err := tmpBlock.WriteString(html.EscapeString(string(rawBytes))); err != nil { if _, err := tmpBlock.WriteString(html.EscapeString(string(rawBytes))); err != nil {
return err return err
} }
_, err = tmpBlock.WriteString("</pre>") if _, err := tmpBlock.WriteString("</pre>"); err != nil {
return err return err
}
return tmpBlock.Flush()
} }
rd, err := csv.CreateReaderAndDetermineDelimiter(ctx, bytes.NewReader(rawBytes)) rd, err := csv.CreateReaderAndDetermineDelimiter(ctx, bytes.NewReader(rawBytes))

Loading…
Cancel
Save