gonzbee icon indicating copy to clipboard operation
gonzbee copied to clipboard

charsetReader can output characters that cause xml decoding to fail

Open acrispino opened this issue 12 years ago • 0 comments

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.

acrispino avatar Apr 01 '13 23:04 acrispino