Sfoglia il codice sorgente

Render full plain readme. (#17083)

tags/v1.16.0-rc1
KN4CK3R 2 anni fa
parent
commit
8fb3a50a37
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4
    0
      routers/web/repo/view.go

+ 4
- 0
routers/web/repo/view.go Vedi File

@@ -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…
Annulla
Salva