loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'fix(oauth): HTML snippets in templates can be displayed' (#4028) from earl-warren/forgejo:wip-html-templates into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4028
Reviewed-by: 0ko <0ko@noreply.codeberg.org>

+4 -3
+4 -3
routers/web/auth/oauth.go
··· 10 10 "errors" 11 11 "fmt" 12 12 "html" 13 + "html/template" 13 14 "io" 14 15 "net/http" 15 16 "net/url" ··· 502 503 ctx.Data["Scope"] = form.Scope 503 504 ctx.Data["Nonce"] = form.Nonce 504 505 if user != nil { 505 - ctx.Data["ApplicationCreatorLinkHTML"] = fmt.Sprintf(`<a href="%s">@%s</a>`, html.EscapeString(user.HomeLink()), html.EscapeString(user.Name)) 506 + ctx.Data["ApplicationCreatorLinkHTML"] = template.HTML(fmt.Sprintf(`<a href="%s">@%s</a>`, html.EscapeString(user.HomeLink()), html.EscapeString(user.Name))) 506 507 } else { 507 - ctx.Data["ApplicationCreatorLinkHTML"] = fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(setting.AppSubURL+"/"), html.EscapeString(setting.AppName)) 508 + ctx.Data["ApplicationCreatorLinkHTML"] = template.HTML(fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(setting.AppSubURL+"/"), html.EscapeString(setting.AppName))) 508 509 } 509 - ctx.Data["ApplicationRedirectDomainHTML"] = "<strong>" + html.EscapeString(form.RedirectURI) + "</strong>" 510 + ctx.Data["ApplicationRedirectDomainHTML"] = template.HTML("<strong>" + html.EscapeString(form.RedirectURI) + "</strong>") 510 511 // TODO document SESSION <=> FORM 511 512 err = ctx.Session.Set("client_id", app.ClientID) 512 513 if err != nil {