소스 검색

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…
취소
저장