summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-12-04 12:07:54 +0100
committerGitHub <noreply@github.com>2023-12-04 12:07:54 +0100
commit9f978d387f8b7cb6bc03fe6b4dd52bb16862a784 (patch)
treedc53e021fbf8a89e7ff0d3e86bbe9416ce5d7ecb /tpl/tplimpl
parent14d85ec136413dcfc96ad8e4d31633f8f9cbf410 (diff)
Pull in the latest code from Go's template packages (#11771)
Fixes #10707 Fixes #11507
Diffstat (limited to 'tpl/tplimpl')
-rw-r--r--tpl/tplimpl/integration_test.go22
1 files changed, 2 insertions, 20 deletions
diff --git a/tpl/tplimpl/integration_test.go b/tpl/tplimpl/integration_test.go
index fa511fbab..1b2cffce6 100644
--- a/tpl/tplimpl/integration_test.go
+++ b/tpl/tplimpl/integration_test.go
@@ -114,7 +114,6 @@ and2: true
or2: true
counter2: 3
`)
-
}
// Issue 10495
@@ -163,7 +162,6 @@ title: "S3P1"
}
func TestGoTemplateBugs(t *testing.T) {
-
t.Run("Issue 11112", func(t *testing.T) {
t.Parallel()
@@ -188,11 +186,9 @@ func TestGoTemplateBugs(t *testing.T) {
b.AssertFileContent("public/index.html", `key = value`)
})
-
}
func TestSecurityAllowActionJSTmpl(t *testing.T) {
-
filesTemplate := `
-- config.toml --
SECURITYCONFIG
@@ -211,20 +207,6 @@ var a = §§{{.Title }}§§;
},
).BuildE()
- b.Assert(err, qt.Not(qt.IsNil))
- b.Assert(err.Error(), qt.Contains, "{{.Title}} appears in a JS template literal")
-
- files = strings.ReplaceAll(filesTemplate, "SECURITYCONFIG", `
-[security]
-[security.gotemplates]
-allowActionJSTmpl = true
-`)
-
- b = hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
-
+ // This used to fail, but not in >= Hugo 0.121.0.
+ b.Assert(err, qt.IsNil)
}