]> Cypherpunks repositories - gostls13.git/commit
exp/template/html: recognize whitespace at start of URLs.
authorMike Samuel <mikesamuel@gmail.com>
Sun, 18 Sep 2011 18:55:14 +0000 (11:55 -0700)
committerMike Samuel <mikesamuel@gmail.com>
Sun, 18 Sep 2011 18:55:14 +0000 (11:55 -0700)
commite213a0c0fcd51f43d38b9423561989ed0b9e616c
tree72f0a95d70e639cac14cbf15d069ee83e76cd4ba
parent605e57d8fee696238f3338c415043f16a7743731
exp/template/html: recognize whitespace at start of URLs.

HTML5 uses "Valid URL potentially surrounded by spaces" for
attrs: http://www.w3.org/TR/html5/index.html#attributes-1

    <a href=" {{.}}">

should be escaped to filter out "javascript:..." as data.

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