about summary refs log tree commit diff stats
path: root/gomponents.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2020-10-21 21:59:52 +0200
committerGitHub2020-10-21 21:59:52 +0200
commit42433a4a096f50c030479c962b0fe1337fa99c5e (patch)
tree1ea033e4b573993b6f816e54dd223b10e073d135 /gomponents.go
parent4448a48d85e15895ce68c3d2b9ca009a222fcd2a (diff)
downloadgomponents-42433a4a096f50c030479c962b0fe1337fa99c5e.tar.lz
gomponents-42433a4a096f50c030479c962b0fe1337fa99c5e.tar.zst
gomponents-42433a4a096f50c030479c962b0fe1337fa99c5e.zip
Use HTMLEscapeString in Textf (#27)
Diffstat (limited to 'gomponents.go')
-rw-r--r--gomponents.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/gomponents.go b/gomponents.go
index 7b93fd9..ae9a158 100644
--- a/gomponents.go
+++ b/gomponents.go
@@ -140,7 +140,7 @@ func Text(t string) NodeFunc {
 // Textf creates a text DOM Node that Renders the interpolated and escaped string t.
 func Textf(format string, a ...interface{}) NodeFunc {
 	return func() string {
-		return template.HTMLEscaper(fmt.Sprintf(format, a...))
+		return template.HTMLEscapeString(fmt.Sprintf(format, a...))
 	}
 }