Browse Source

Render full plain readme. (#17083)

tags/v1.16.0-rc1
KN4CK3R 2 years ago
parent
commit
8fb3a50a37
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      routers/web/repo/view.go

+ 4
- 0
routers/web/repo/view.go View File

@@ -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…
Cancel
Save