Add missing utf decode in html cleaner in soc.logic.cleaning module. This should fix all the 500 errors that we got. Remove extra blank line in soc.views.model.document.
Patch by: Pawel Solyga
Reviewed by: to-be-reviewed
--- a/app/soc/logic/cleaning.py Wed Mar 25 22:42:35 2009 +0000
+++ b/app/soc/logic/cleaning.py Thu Mar 26 12:19:33 2009 +0000
@@ -352,6 +352,7 @@
sanitizer = feedparser._HTMLSanitizer('utf-8')
sanitizer.feed(content)
content = sanitizer.output()
+ content = content.decode('utf-8')
content = content.strip().replace('\r\n', '\n')
return content
--- a/app/soc/views/models/document.py Wed Mar 25 22:42:35 2009 +0000
+++ b/app/soc/views/models/document.py Thu Mar 26 12:19:33 2009 +0000
@@ -94,7 +94,6 @@
required=True),
'prefix': forms.fields.CharField(widget=widgets.ReadOnlyInput(),
required=True),
-
'clean_content': cleaning.clean_html_content('content'),
'clean_link_id': cleaning.clean_link_id('link_id'),
'clean_scope_path': cleaning.clean_scope_path('scope_path'),