mirror of
https://github.com/go-gitea/gitea
synced 2024-12-01 10:53:02 +01:00
Fix readme render bug (#15649)
This commit is contained in:
parent
2c57352a30
commit
d7dbe4feeb
1 changed files with 1 additions and 0 deletions
|
@ -512,6 +512,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
|
||||||
}
|
}
|
||||||
ctx.Data["FileContent"] = result.String()
|
ctx.Data["FileContent"] = result.String()
|
||||||
} else if readmeExist {
|
} else if readmeExist {
|
||||||
|
buf, _ := ioutil.ReadAll(rd)
|
||||||
ctx.Data["IsRenderedHTML"] = true
|
ctx.Data["IsRenderedHTML"] = true
|
||||||
ctx.Data["FileContent"] = strings.ReplaceAll(
|
ctx.Data["FileContent"] = strings.ReplaceAll(
|
||||||
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,
|
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,
|
||||||
|
|
Loading…
Reference in a new issue