[filter] manage basestring entry in CleanHTML filter
This commit is contained in:
parent
96271b6de4
commit
ac161104ea
1 changed files with 3 additions and 1 deletions
|
|
@ -209,7 +209,9 @@ class CleanHTML(Filter):
|
|||
|
||||
@classmethod
|
||||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue