Skip to content

Commit b673a24

Browse files
zeripathKN4CK3R
andauthored
Render full plain readme. (#17083) (#17090)
Backport #17083 Co-authored-by: KN4CK3R <[email protected]> Co-authored-by: KN4CK3R <[email protected]>
1 parent fd35f56 commit b673a24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routers/web/repo/view.go

+4
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)