-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: newlines in char data should not be escaped #9204
Comments
Additionally to \n, \r and \t are escaped too, so I guess if one is removed, the others should go too. I thought this would be easily fixable, since this touches just a few lines, but I am concerned that it would break other applications. According to http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-white-space and http://msdn.microsoft.com/en-us/library/ms256097%28v=vs.110%29.aspx white spaces in the content should be preserved which brings up the question why they are escaped in the first place. Maybe the original author could say something about this? |
I recently ran across this issue as well. Am I correct that this won't be fixed until 1.5? Any suggested workarounds? |
@xogeny, it's not a real plug-in replacement, but for my use case (modifying specific text content in otherwise untouched XML files) I just wrote a pretty dump, quick-and-dirty XML tokenizer from scratch. There's no namespace handling or even parsing of attributes but it works for me: https://github.com/roblillack/gockl |
@rogpeppe didn't you just fix that yesterday with https://golang.org/cl/9310 merged as 4a3e000? |
It's fixed by https://golang.org/cl/9310. |
The text was updated successfully, but these errors were encountered: