]> Cypherpunks repositories - gostls13.git/commit
html/template: preserve attr in stateBeforeValue
authorNodir Turakulov <nodir@google.com>
Sat, 5 Sep 2015 01:07:55 +0000 (18:07 -0700)
committerRob Pike <r@golang.org>
Wed, 9 Sep 2015 23:31:06 +0000 (23:31 +0000)
commit918c82308a8b489cc5f179f4e18531ad12cd6692
tree566bcc4da2ad3ea3b08acdb3c91b29da8403be01
parent6599450016244b9e3e074e87d7064219ee2e5cf8
html/template: preserve attr in stateBeforeValue

Context: #12149. The problem there is that contents of
<script type="text/template"> are treated as JS, and thus // is treated
as regexp.

Preserve context.attr while we are in the attribute, in particular in
stateBeforeValue, so we have attr when reading attr value.

Next CL will actually fix the bug.

Change-Id: I99add2237b0885ecdcc08b4f7c25d0af99173e53
Reviewed-on: https://go-review.googlesource.com/14335
Reviewed-by: Rob Pike <r@golang.org>
src/html/template/context.go
src/html/template/escape_test.go
src/html/template/transition.go