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.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Thu, 26 Mar 2009 12:19:33 +0000
changeset 2014 e6d297dcf7aa
parent 2013 eda2589a90e6
child 2015 910155b7c8c0
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
app/soc/logic/cleaning.py
app/soc/views/models/document.py
--- 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'),