Render full plain readme. (#17083)

This commit is contained in:
KN4CK3R authored and GitHub committed 2021-09-17 21:46:57 -05:00
1 parent 0b368aa73d
commit 8fb3a50a37
1 file changed
+4
+4
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>`,
)