We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd35f56 commit b673a24Copy full SHA for b673a24
routers/web/repo/view.go
@@ -353,6 +353,10 @@ func renderDirectory(ctx *context.Context, treeLink string) {
353
}
354
} else {
355
ctx.Data["IsRenderedHTML"] = true
356
+ buf, err = ioutil.ReadAll(rd)
357
+ if err != nil {
358
+ log.Error("ReadAll failed: %v", err)
359
+ }
360
ctx.Data["FileContent"] = strings.ReplaceAll(
361
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,
362
)
0 commit comments