summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/view.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 10deb7065a..285cacc2df 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -512,6 +512,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
}
ctx.Data["FileContent"] = result.String()
} else if readmeExist {
+ buf, _ := ioutil.ReadAll(rd)
ctx.Data["IsRenderedHTML"] = true
ctx.Data["FileContent"] = strings.ReplaceAll(
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,