Skip to content

Commit

Permalink
Fix incorrect rendering csv file when file size is larger than UI.CSV…
Browse files Browse the repository at this point in the history
….MaxFileSize (#29653)

Fix #29506
  • Loading branch information
yp05327 committed Mar 8, 2024
1 parent f86e9a0 commit 9dc8a63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/markup/csv/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
return err
}
_, err = tmpBlock.WriteString("</pre>")
return err
if _, err := tmpBlock.WriteString("</pre>"); err != nil {
return err
}
return tmpBlock.Flush()
}

rd, err := csv.CreateReaderAndDetermineDelimiter(ctx, bytes.NewReader(rawBytes))
Expand Down

0 comments on commit 9dc8a63

Please sign in to comment.