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

Comments

Projects
None yet
4 participants
@mark-summerfield
Copy link

mark-summerfield commented Aug 13, 2011

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

This comment has been minimized.

Copy link
Author

mark-summerfield commented Aug 13, 2011

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

This comment has been minimized.

Copy link
Contributor

robpike commented Aug 13, 2011

Comment 2:

Owner changed to @rsc.

Status changed to Accepted.

@rsc

This comment has been minimized.

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

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.