]> Cypherpunks repositories - gostls13.git/commit
exp/template/html: Reworked escapeText to recognize attr boundaries.
authorMike Samuel <mikesamuel@gmail.com>
Thu, 25 Aug 2011 01:24:43 +0000 (11:24 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 25 Aug 2011 01:24:43 +0000 (11:24 +1000)
commit42a56d3e810d15895eb1e072bd0ffe5928daa3b3
tree08f3a3d02d93b2eedb79f0e5e1ed1dd48e0bc873
parent15580526de5419ae988f86cb807967f740b36f3d
exp/template/html: Reworked escapeText to recognize attr boundaries.

The following testcases now pass:

`<a href=x` tests that we do not error on partial unquoted attrs.
`<a href=x ` tests that spaces do end unquoted attrs on spaces.
`<a href=''` tests that we recognize the end of single quoted attrs.
`<a href=""` tests that we recognize the end of double quoted attrs.

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