mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 07:43:18 -05:00
Render full plain readme. (#17083)
This commit is contained in:
parent
0b368aa73d
commit
8fb3a50a37
1 changed files with 4 additions and 0 deletions
|
@ -353,6 +353,10 @@ func renderDirectory(ctx *context.Context, treeLink string) {
|
|||
}
|
||||
} else {
|
||||
ctx.Data["IsRenderedHTML"] = true
|
||||
buf, err = ioutil.ReadAll(rd)
|
||||
if err != nil {
|
||||
log.Error("ReadAll failed: %v", err)
|
||||
}
|
||||
ctx.Data["FileContent"] = strings.ReplaceAll(
|
||||
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue