Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/xml: Encoder encodes double quotes incorrectly. #12400
xml.Encoder encodes a double quote in a text node into the entity ". Technically this a valid entity. But the standard is to encode a double quote into " instead. This is the standard when not using a DTD. https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML
I only noticed this because it sends riak-cs haywire when used with the aws-sdk-go client (an AWS s3 client written in go).
Here is an example.
I don't see anywhere in the spec that says
I'd be inclined not to change the existing behavior because—as @nodirt says—this may break (or at least unexpectedly change) existing programs.