-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding/xml: Encoder encodes double quotes incorrectly. #12400
Comments
Same applies to |
Except, this may be considered backwards incompatible. @adg? |
Apparently, this is behavior is intended because Lines 1833 to 1834 in bf21643
@adg (or another core gopher) to make the final decision (I can't close bugs) |
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. |
|
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.
https://gist.github.com/dragonfax/ca3ee45a0acf97820f58
The text was updated successfully, but these errors were encountered: