diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-09-13 12:32:06 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2017-09-13 12:32:06 +0200 |
commit | 2d613dd905bb8eeb8af57e30ddd749a0f04fbd3c (patch) | |
tree | c25503456ff575ccd88087afc285bb202cd390c8 /hugolib/site_output_test.go | |
parent | 642ba6cab24c558b16378178fe829cbc45845424 (diff) | |
download | hugo-2d613dd905bb8eeb8af57e30ddd749a0f04fbd3c.tar.gz hugo-2d613dd905bb8eeb8af57e30ddd749a0f04fbd3c.zip |
tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)
Fixes #3876
Diffstat (limited to 'hugolib/site_output_test.go')
-rw-r--r-- | hugolib/site_output_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go index 941387e35..a8a43d625 100644 --- a/hugolib/site_output_test.go +++ b/hugolib/site_output_test.go @@ -125,6 +125,9 @@ outputs: %s # Doc {{< myShort >}} + +{{< myOtherShort >}} + ` mf := afero.NewMemMapFs() @@ -144,6 +147,7 @@ other = "Olboge" "layouts/partials/GoHugo.html", `Go Hugo Partial`, "layouts/_default/baseof.json", `START JSON:{{block "main" .}}default content{{ end }}:END JSON`, "layouts/_default/baseof.html", `START HTML:{{block "main" .}}default content{{ end }}:END HTML`, + "layouts/shortcodes/myOtherShort.html", `OtherShort: {{ "<h1>Hi!</h1>" | safeHTML }}`, "layouts/shortcodes/myShort.html", `ShortHTML`, "layouts/shortcodes/myShort.json", `ShortJSON`, @@ -210,6 +214,7 @@ Content: {{ .Content }} "Output/Rel: HTML/canonical|", "en: Elbow", "ShortJSON", + "OtherShort: <h1>Hi!</h1>", ) th.assertFileContent("public/index.html", @@ -218,6 +223,7 @@ Content: {{ .Content }} `List HTML|JSON Home|<atom:link href=http://example.com/blog/ rel="self" type="text/html+html" />`, "en: Elbow", "ShortHTML", + "OtherShort: <h1>Hi!</h1>", ) th.assertFileContent("public/nn/index.html", "List HTML|JSON Nynorsk Heim|", @@ -228,6 +234,7 @@ Content: {{ .Content }} // JSON is plain text, so no need to safeHTML this and that `<atom:link href=http://example.com/blog/index.json rel="self" type="application/json+json" />`, "ShortJSON", + "OtherShort: <h1>Hi!</h1>", ) th.assertFileContent("public/nn/index.json", "List JSON|JSON Nynorsk Heim|", |