- # extract charset from "text/html; foo; charset=UTF-8; bar;"
- self.charset = content.lower().split('charset=')[1].split(';')[0]
+ # extract charset from "text/html; foo; charset=UTF-8, bar; baz;"
+ self.charset = content.lower().split('charset=')[1].split(';')[0].split(',')[0]