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: does not append ; to unrecognised entities #3447
What steps will reproduce the problem? 1. Create a decoder with Strict=false 2. Let it parse a (raw) token with an unrecognised entity, e.g. "Hello&nbps;Bye" 3. Print the contents of the parsed token (which will be a CharData) http://play.golang.org/p/sqWtt6BgWp What is the expected output? Hello Bye What do you see instead? Hello Bye Which compiler are you using (5g, 6g, 8g, gccgo)? - Which operating system are you using? not relevant (Mac OS X 10.7.3) Which version are you using? (run 'go version') go1 Please provide any additional information below. I believe that in http://golang.org/src/pkg/encoding/xml/xml.go lines 880 and 912 should be followed by a d.buf.WriteByte(';').
It sounds sensible from the bug report, but I'll have a more careful look at the logic. It might be a copy & paste bug, but the same mistake done twice in a raw makes me wonder if there's something else to be aware of.
Owner changed to @niemeyer.