mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 13:45:19 +00:00
Fix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize (#29653)
Fix #29506 (cherry picked from commit 9dc8a6336edddca0f3f90392bbc398f4ceaeaf13)
This commit is contained in:
parent
427ab550a6
commit
fb77784017
|
@ -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…
Reference in a new issue