gonzbee
gonzbee copied to clipboard
charsetReader can output characters that cause xml decoding to fail
if an nzb has mangled character encoding somehow, charsetReader might translate characters into those that are not allowed in xml. This will cause xml decoding to fail with the error "illegal character code ..."
it would be worth it to check if a character falls outside of the valid range (http://golang.org/src/pkg/encoding/xml/xml.go#L962) and maybe drop it or convert it into the unicode replacement character.