1
0
mirror of https://github.com/golang/go synced 2024-11-23 19:30:05 -07:00
go/api/next
Roland Shoemaker c9c885f92f 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>
2023-10-02 15:18:39 +00:00
..
50102.txt archive/tar: add FileInfoNames interface 2023-08-07 00:25:25 +00:00
51246.txt syscall: add support to get pidfd from ForkExec on Linux 2023-09-07 19:11:15 +00:00
51971.txt net/http: add ServeFileFS, FileServerFS, NewFileTransportFS 2023-08-07 17:07:12 +00:00
53693.txt encoding: add AppendEncode and AppendDecode 2023-08-17 16:23:42 +00:00
54898.txt archive/zip: add AddFS method to zip Writer 2023-07-31 18:10:41 +00:00
56353.txt slices: add Concat 2023-08-08 14:31:39 +00:00
58000.txt archive/tar: add AddFS method to Writer 2023-09-13 13:59:01 +00:00
59599.txt reflect: deprecate PtrTo 2023-07-27 23:28:51 +00:00
60061.txt go/ast: add Unparen(Expr) helper 2023-07-20 20:19:51 +00:00
60088.txt reflect: add TypeFor 2023-07-31 15:50:15 +00:00
60204.txt cmp: add Or 2023-09-25 14:30:20 +00:00
60370.txt database/sql: add Null[T] 2023-08-07 14:26:37 +00:00
61410.txt net/http: implement path value methods on Request 2023-09-14 00:00:28 +00:00
61619.txt html/template: support parsing complex JS template literals 2023-10-02 15:18:39 +00:00
61642.txt net/netip: add AddrPort.Compare and Prefix.Compare 2023-09-11 20:26:41 +00:00
61758.txt testing/slogtest: add Run to run cases as subtests 2023-09-08 20:37:12 +00:00
61974.txt debug/elf,cmd/link: add additional MIPS64 relocation type 2023-09-08 04:32:10 +00:00