]> Cypherpunks repositories - gostls13.git/commit
html/template: update the Tree field after parsing new templates
authorRob Pike <r@golang.org>
Wed, 25 Sep 2013 00:00:09 +0000 (10:00 +1000)
committerRob Pike <r@golang.org>
Wed, 25 Sep 2013 00:00:09 +0000 (10:00 +1000)
commite2e9d1d6841d4ee937568eeb73a9b43e73e88ad3
tree04354b5e9cd63ba4f8a5bd29f076302fc50fce8c
parent20db0f428a28a529146b5016b97061f2b13c54d4
html/template: update the Tree field after parsing new templates
After text/template.Parse, all the templates may have changed, so
we need to set them all back to their unescaped state. The code
did this but (mea culpa) forgot to set the Tree field of the html/template
struct.

Since the Tree is reset during escaping, this only matters if an error
arises during escaping and we want to print a message.

Fixes #6459.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13877043
src/pkg/html/template/escape_test.go
src/pkg/html/template/template.go