]> Cypherpunks repositories - gostls13.git/commitdiff
html/template: encoding/json does more escaping now, so update the html/template...
authorDavid Symonds <dsymonds@golang.org>
Thu, 1 Mar 2012 06:52:05 +0000 (17:52 +1100)
committerDavid Symonds <dsymonds@golang.org>
Thu, 1 Mar 2012 06:52:05 +0000 (17:52 +1100)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5714052

src/pkg/html/template/escape_test.go

index a92a0596c760ea4025483e398b22114a11d63f96..2bbb1b1bc94cfb40341b15d8b9696bc5db9a7f53 100644 (file)
@@ -223,14 +223,14 @@ func TestEscape(t *testing.T) {
                        `<button onclick='alert(&quot;\x3cHello\x3e&quot;)'>`,
                },
                {
-                       "badMarshaller",
+                       "badMarshaler",
                        `<button onclick='alert(1/{{.B}}in numbers)'>`,
                        `<button onclick='alert(1/ /* json: error calling MarshalJSON for type *template.badMarshaler: invalid character &#39;f&#39; looking for beginning of object key string */null in numbers)'>`,
                },
                {
-                       "jsMarshaller",
+                       "jsMarshaler",
                        `<button onclick='alert({{.M}})'>`,
-                       `<button onclick='alert({&#34;&lt;foo&gt;&#34;:&#34;O&#39;Reilly&#34;})'>`,
+                       `<button onclick='alert({&#34;\u003cfoo\u003e&#34;:&#34;O&#39;Reilly&#34;})'>`,
                },
                {
                        "jsStrNotUnderEscaped",