Skip to content
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: Marshal doesn't appear to escape chardata #2150

Closed
mark-summerfield opened this issue Aug 13, 2011 · 3 comments
Closed

encoding/xml: Marshal doesn't appear to escape chardata #2150

mark-summerfield opened this issue Aug 13, 2011 · 3 comments

Comments

@mark-summerfield
Copy link

c17ce5ec06b4 weekly/weekly.2011-08-10

The tiny attached program does not escape chardata. Kyle Lemons told me "I suspect
chardata isn't escaped when it should
be."

Attachments:

  1. test1.go (1067 bytes)
@mark-summerfield
Copy link
Author

Comment 1:

Forgot to mention. Here is what the program outputs:
&{{ } ['This & That: Chapter 1, Chapter 2' '<Rainbows>: Chapter I, Chapter II']}
<BOOKS><BOOK><CHAPTER>Chapter 1</CHAPTER><CHAPTER>Chapter
2</CHAPTER>This & That</BOOK><BOOK><CHAPTER>Chapter
I</CHAPTER><CHAPTER>Chapter
II</CHAPTER><Rainbows></BOOK></BOOKS>
Notice that "This & That" should be "This & That", and "<Rainbows>" should be
"<Rainbows>".

@robpike
Copy link
Contributor

robpike commented Aug 13, 2011

Comment 2:

Owner changed to @rsc.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Aug 17, 2011

Comment 3:

This issue was closed by revision ca6e1db.

Status changed to Fixed.

@mikioh mikioh changed the title xml.Marshal doesn't appear to escape chardata encoding/xml: Marshal doesn't appear to escape chardata Jan 9, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants