summaryrefslogtreecommitdiff
path: root/src/html/template/doc.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2023-04-04 22:07:09 +0000
committerGopher Robot <gobot@golang.org>2023-04-05 16:19:14 +0000
commit22c1d18a276a6edadfb140ad7013ed74b7ed792b (patch)
treec4a9348ced396e74dc87c9e2ab15556cf184b2c2 /src/html/template/doc.go
parente6130c66c87ba54b5847825ca68d221d8898ceb5 (diff)
downloadgo-git-22c1d18a276a6edadfb140ad7013ed74b7ed792b.tar.gz
[release-branch.go1.19] html/template,mime/multipart: document new GODEBUG settings
This change documents the new GODEBUG settings introduced for html/template and mime/multipart, released with Go 1.19.8 and Go 1.20.3 as part of a security fix. Updates #59153. For #59269. Updates #59234. For #59271. Change-Id: I25f4d8245da3301dccccfb44da8ff1a5985392a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/482535 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/html/template/doc.go')
-rw-r--r--src/html/template/doc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/html/template/doc.go b/src/html/template/doc.go
index 5d1631b266..ce7b094d9a 100644
--- a/src/html/template/doc.go
+++ b/src/html/template/doc.go
@@ -231,5 +231,12 @@ Least Surprise Property:
"A developer (or code reviewer) familiar with HTML, CSS, and JavaScript, who
knows that contextual autoescaping happens should be able to look at a {{.}}
and correctly infer what sanitization happens."
+
+As a consequence of the Least Surprise Property, template actions within an
+ECMAScript 6 template literal are disabled by default.
+Handling string interpolation within these literals is rather complex resulting
+in no clear safe way to support it.
+To re-enable template actions within ECMAScript 6 template literals, use the
+GODEBUG=jstmpllitinterp=1 environment variable.
*/
package template