瀏覽代碼

Render full plain readme. (#17083)

tags/v1.16.0-rc1
KN4CK3R 2 年之前
父節點
當前提交
8fb3a50a37
No account linked to committer's email address
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      routers/web/repo/view.go

+ 4
- 0
routers/web/repo/view.go 查看文件

@@ -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>`,
)

Loading…
取消
儲存