Fix HtmlSanitizer to return cleaned string in proper encoding.
This fix prevent HtmlSanitizer from throwing UnicodeDecodeError exception.
--- a/app/htmlsanitizer/HtmlSanitizer.py Mon Jul 06 00:31:48 2009 +0200
+++ b/app/htmlsanitizer/HtmlSanitizer.py Mon Jul 06 00:54:48 2009 +0200
@@ -203,7 +203,7 @@
if len(string) and self.settings['auto_clean'] : self.clean()
def get_string(self):
- return unicode(self.root.renderContents())
+ return self.root.renderContents().decode('utf-8')
string = property(get_string, set_string)