]> Cypherpunks.ru repositories - gostls13.git/commit
html/template: attach functions to namespace
authorIan Lance Taylor <iant@golang.org>
Mon, 21 Dec 2020 19:21:59 +0000 (11:21 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 7 Jan 2021 17:51:29 +0000 (17:51 +0000)
commite60cffa4ca9ae726d96b53817d82d98402017772
tree9afa0d0d1d68e952a7c8f74d3fb6623864f3af80
parent6da2d3b7d7f9c0063bc4128c2453db65c96f5299
html/template: attach functions to namespace

The text/template functions are stored in a data structure shared by
all related templates, so do the same with the original, unwrapped,
functions on the html/template side.

For #39807
Fixes #43295

Change-Id: I9f64a0a601f1151c863a2833b5be2baf649b6cef
Reviewed-on: https://go-review.googlesource.com/c/go/+/279492
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
src/html/template/exec_test.go
src/html/template/template.go