Commit ac161104 authored by Bezleputh's avatar Bezleputh Committed by Romain Bignon

[filter] manage basestring entry in CleanHTML filter

parent 96271b6d
......@@ -209,7 +209,9 @@ class CleanHTML(Filter):
def clean(cls, txt):
return html2text(html.tostring(txt, encoding=unicode))
if not isinstance(txt, basestring):
txt = html.tostring(txt, encoding=unicode)
return html2text(txt)
class RawText(Filter):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment