]> Cypherpunks repositories - gostls13.git/commit
html/template: reset templates orphaned by (*Template).New
authorSamuel Tan <samueltan@google.com>
Fri, 17 Nov 2017 23:47:33 +0000 (15:47 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 8 Dec 2017 04:58:28 +0000 (04:58 +0000)
commit6af8c0d812f7bd20d81df986c3ed425f3251e8dc
treee9934f78918c9c195e04ff5a13ec91a531b696b1
parent4c800f03c9f988d5de0481de0d77d103213b295c
html/template: reset templates orphaned by (*Template).New

If (*Template).New replaces an existing template, reset the
existing template that is going to be replaced so that any
later attempt to execute this orphaned template will fail.

Fixes #22780

Change-Id: I0e058f42c1542c86d19dc5f6c4e1e859e670a4a2
Reviewed-on: https://go-review.googlesource.com/78542
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/html/template/escape_test.go
src/html/template/template.go