aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorRoland Shoemaker <roland@golang.org>2023-07-05 11:56:03 -0700
committerGopher Robot <gobot@golang.org>2023-10-02 15:18:39 +0000
commitc9c885f92f540878d85c02b510c62a3ebf87baf6 (patch)
treef0988905deb70eb0c04784ce8b4e8d31f95ca1b4 /api
parentdeb8e29000ebecbd788e0e86e239d52c26707457 (diff)
downloadgo-c9c885f92f540878d85c02b510c62a3ebf87baf6.tar.gz
go-c9c885f92f540878d85c02b510c62a3ebf87baf6.zip
html/template: support parsing complex JS template literals
This change undoes the restrictions added in CL 482079, which added a blanket ban on using actions within JS template literal strings, and adds logic to support actions while properly applies contextual escaping based on the correct context within the literal. Since template literals can contain both normal strings, and nested JS contexts, logic is required to properly track those context switches during parsing. ErrJsTmplLit is deprecated, and the GODEBUG flag jstmpllitinterp no longer does anything. Fixes #61619 Change-Id: I0338cc6f663723267b8f7aaacc55aa28f60906f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/507995 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Roland Shoemaker <roland@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'api')
-rw-r--r--api/next/61619.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/next/61619.txt b/api/next/61619.txt
new file mode 100644
index 0000000000..c63a3140e8
--- /dev/null
+++ b/api/next/61619.txt
@@ -0,0 +1 @@
+pkg html/template, const ErrJSTemplate //deprecated #61619