]> Cypherpunks repositories - gostls13.git/commitdiff
html: update jstmpllitinterp doc
authorRoland Shoemaker <roland@golang.org>
Wed, 8 May 2024 16:17:05 +0000 (09:17 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 22 May 2024 18:04:29 +0000 (18:04 +0000)
We no longer do anything with this GODEBUG.

Fixes #66217

Change-Id: I998797b6a573013f5b9c8ded835acae572327d18
Reviewed-on: https://go-review.googlesource.com/c/go/+/584117
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>

doc/godebug.md
src/html/template/doc.go

index b5bee3a6131c57377947c3864b6aaacdc1664b94..b3a00a0c2b34f9eaa485e6486db0c154bd05bb7e 100644 (file)
@@ -193,6 +193,10 @@ Go 1.23 changed the behavior of
 serial numbers that are longer than 20 octets. This change can be reverted with
 the the [`x509seriallength` setting](/pkg/crypto/x509/#ParseCertificate).
 
+Go 1.23 re-enabled support in html/template for ECMAScript 6 template literals by default.
+The [`jstmpllitinterp` setting](/pkg/html/template#hdr-Security_Model) no longer has
+any effect.
+
 ### Go 1.22
 
 Go 1.22 adds a configurable limit to control the maximum acceptable RSA key size
index 672d42ba322753893f3c0ecc1884d7c58497f789..b7be04cbd0a228d80d99254d74eabf9ddd54bf9a 100644 (file)
@@ -232,11 +232,9 @@ Least Surprise Property:
 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.
+Previously, ECMAScript 6 template literal were disabled by default, and could be
+enabled with the GODEBUG=jstmpllitinterp=1 environment variable. Template
+literals are now supported by default, and setting jstmpllitinterp has no
+effect.
 */
 package template