]> Cypherpunks repositories - gostls13.git/commit
text/template: support delimiters that can be confused with actions
authormprahl <mprahl@redhat.com>
Tue, 5 Apr 2022 19:06:33 +0000 (15:06 -0400)
committerIan Lance Taylor <iant@golang.org>
Wed, 6 Apr 2022 22:27:40 +0000 (22:27 +0000)
commit9a6acc83c853c17700c44e336e2d3e2c0fe9a72b
tree95999723a876ad00041341d8ff75ecaea8c727fc
parent81ae993e54547415ba674082801b05961e3f2aa3
text/template: support delimiters that can be confused with actions

In fields that start with the same character as the right delimiter, the
whole delimiter needs to be checked. The first character alone is not
sufficient.

Fixes #52165

Change-Id: I1e4086048417693757f34d0e9ff3bf86aba0d35c
Reviewed-on: https://go-review.googlesource.com/c/go/+/398475
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
src/text/template/parse/lex.go
src/text/template/parse/lex_test.go