diff options
| author | Nigel Tao <nigeltao@golang.org> | 2012-04-12 09:35:43 +1000 |
|---|---|---|
| committer | Nigel Tao <nigeltao@golang.org> | 2012-04-12 09:35:43 +1000 |
| commit | 6277656d69640da9166bbac2a132a3ddee61dcac (patch) | |
| tree | 6f4080c783f61ea8edd829c8afb329d9ee408628 /src/pkg/text/template | |
| parent | 772e8ff4584ac6b97d8f3c38f0b21161ca72fe81 (diff) | |
| download | go-6277656d69640da9166bbac2a132a3ddee61dcac.tar.xz | |
html, exp/html: escape ' and " as ' and ", since IE8 and
below do not support '.
This makes package html consistent with package text/template's
HTMLEscape function.
Fixes #3489.
R=rsc, mikesamuel, dsymonds
CC=golang-dev
https://golang.org/cl/5992071
Diffstat (limited to 'src/pkg/text/template')
| -rw-r--r-- | src/pkg/text/template/funcs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/text/template/funcs.go b/src/pkg/text/template/funcs.go index 525179cb49..8fbf0ef50a 100644 --- a/src/pkg/text/template/funcs.go +++ b/src/pkg/text/template/funcs.go @@ -246,7 +246,7 @@ func not(arg interface{}) (truth bool) { var ( htmlQuot = []byte(""") // shorter than """ - htmlApos = []byte("'") // shorter than "'" + htmlApos = []byte("'") // shorter than "'" and apos was not in HTML until HTML5 htmlAmp = []byte("&") htmlLt = []byte("<") htmlGt = []byte(">") |
