]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: correctly escape newline, carriage return, and tab
authorIan Lance Taylor <iant@golang.org>
Thu, 18 Oct 2012 20:40:45 +0000 (13:40 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 18 Oct 2012 20:40:45 +0000 (13:40 -0700)
commit1e6d9f49da330e61d29588b1e2f0f3685c03f359
tree69b6d938ad7984562d2031b6aaff6605bd109dfc
parent2abaaefa729502740002fc9a87c012ea7d1a3e64
encoding/xml: correctly escape newline, carriage return, and tab

The generated encodings are those from
http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping

The change to the decoder ensures that we turn &#xD; in the
input into \r, not \n.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6747043
src/pkg/encoding/xml/marshal_test.go
src/pkg/encoding/xml/xml.go