Kaynağa Gözat

Render full plain readme. (#17083)

tags/v1.16.0-rc1
KN4CK3R 2 yıl önce
ebeveyn
işleme
8fb3a50a37
No account linked to committer's email address
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4
    0
      routers/web/repo/view.go

+ 4
- 0
routers/web/repo/view.go Dosyayı Görüntüle

@@ -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…
İptal
Kaydet