]> Cypherpunks repositories - gostls13.git/commit
exp/template/html: fix infinite loop in escapeText on bad input
authorMike Samuel <mikesamuel@gmail.com>
Mon, 26 Sep 2011 07:56:49 +0000 (00:56 -0700)
committerMike Samuel <mikesamuel@gmail.com>
Mon, 26 Sep 2011 07:56:49 +0000 (00:56 -0700)
commit377141510005e1b6d67044f557f7367cccc7e659
tree446e0371fa7ed8c48041e9af11f59eb46f6b5afb
parent66cdd020382760e502fe456f753156f6fa6a2867
exp/template/html: fix infinite loop in escapeText on bad input

The template
    "<a="
caused an infinite loop in escape text.

The change to tTag fixes that and the change to escape.go causes
escapeText to panic on any infinite loop that does not involve
a state cycle.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5115041
src/pkg/exp/template/html/escape.go
src/pkg/exp/template/html/escape_test.go
src/pkg/exp/template/html/transition.go