# HG changeset patch # User Pawel Solyga # Date 1238069973 0 # Node ID e6d297dcf7aae3bb657653a14f8615435a4cb621 # Parent eda2589a90e66ef467ad9ef2ab38b84f883aeb09 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 diff -r eda2589a90e6 -r e6d297dcf7aa app/soc/logic/cleaning.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 diff -r eda2589a90e6 -r e6d297dcf7aa app/soc/views/models/document.py --- 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'),