From c9c885f92f540878d85c02b510c62a3ebf87baf6 Mon Sep 17 00:00:00 2001 From: Roland Shoemaker Date: Wed, 5 Jul 2023 11:56:03 -0700 Subject: 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 Auto-Submit: Roland Shoemaker Reviewed-by: Damien Neil --- api/next/61619.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 api/next/61619.txt (limited to 'api') 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 -- cgit v1.2.3-54-g00ecf