Pull in the latest code from Go's template packages (#11771)

Fixes #10707
Fixes #11507
This commit is contained in:
Bjørn Erik Pedersen
2023-12-04 12:07:54 +01:00
committed by GitHub
parent 14d85ec136
commit 9f978d387f
25 changed files with 417 additions and 190 deletions

View File

@@ -169,13 +169,6 @@ func SetPageInContext(ctx context.Context, p page) context.Context {
return context.WithValue(ctx, texttemplate.PageContextKey, p)
}
// SetSecurityAllowActionJSTmpl sets the global setting for allowing tempalte actions in JS template literals.
// This was added in Hugo 0.114.0.
// See https://github.com/golang/go/issues/59234
func SetSecurityAllowActionJSTmpl(b bool) {
htmltemplate.SecurityAllowActionJSTmpl.Store(b)
}
type page interface {
IsNode() bool
}