mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Rename Str2html to SanitizeHTML and clarify its behavior (#29516)
Str2html was abused a lot. So use a proper name for it: SanitizeHTML And add some tests to show its behavior.
This commit is contained in:
@@ -105,7 +105,7 @@ func Projects(ctx *context.Context) {
|
||||
}
|
||||
|
||||
for _, project := range projects {
|
||||
project.RenderedContent = templates.Str2html(project.Description) // FIXME: is it right? why not render?
|
||||
project.RenderedContent = templates.SanitizeHTML(project.Description) // FIXME: is it right? why not render?
|
||||
}
|
||||
|
||||
err = shared_user.LoadHeaderCount(ctx)
|
||||
@@ -396,7 +396,7 @@ func ViewProject(ctx *context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
project.RenderedContent = templates.Str2html(project.Description) // FIXME: is it right? why not render?
|
||||
project.RenderedContent = templates.SanitizeHTML(project.Description) // FIXME: is it right? why not render?
|
||||
ctx.Data["LinkedPRs"] = linkedPrsMap
|
||||
ctx.Data["PageIsViewProjects"] = true
|
||||
ctx.Data["CanWriteProjects"] = canWriteProjects(ctx)
|
||||
|
Reference in New Issue
Block a user