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: newlines in char data should not be escaped #9204
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?
@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