Skip to content

Commit 8fb3a50

Browse files
authored
Render full plain readme. (#17083)
1 parent 0b368aa commit 8fb3a50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routers/web/repo/view.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ func renderDirectory(ctx *context.Context, treeLink string) {
353353
}
354354
} else {
355355
ctx.Data["IsRenderedHTML"] = true
356+
buf, err = ioutil.ReadAll(rd)
357+
if err != nil {
358+
log.Error("ReadAll failed: %v", err)
359+
}
356360
ctx.Data["FileContent"] = strings.ReplaceAll(
357361
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,
358362
)

0 commit comments

Comments
 (0)