mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-24 21:56:05 +02:00
tpl: Sync go_templates for Go 1.18
Using Go tag go1.18 4aa1efed4853ea067d665a952eee77c52faac774 Updates #9677
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
package template_test
|
||||
@@ -101,7 +102,7 @@ func Example_autoescaping() {
|
||||
|
||||
func Example_escape() {
|
||||
const s = `"Fran & Freddie's Diner" <tasty@example.com>`
|
||||
v := []interface{}{`"Fran & Freddie's Diner"`, ' ', `<tasty@example.com>`}
|
||||
v := []any{`"Fran & Freddie's Diner"`, ' ', `<tasty@example.com>`}
|
||||
|
||||
fmt.Println(template.HTMLEscapeString(s))
|
||||
template.HTMLEscape(os.Stdout, []byte(s))
|
||||
|
Reference in New Issue
Block a user