plugin text syntaxes: fix empty string handling in _remove_markups.
This commit is contained in:
parent
4e1f991e3b
commit
99b218fca4
1 changed files with 2 additions and 0 deletions
|
|
@ -475,5 +475,7 @@ class TextSyntaxes(object):
|
|||
@return: the cleaned string
|
||||
"""
|
||||
cleaner = clean.Cleaner(kill_tags=["style"])
|
||||
if not xhtml:
|
||||
return ""
|
||||
cleaned = cleaner.clean_html(html.fromstring(xhtml))
|
||||
return html.tostring(cleaned, encoding=str, method="text")
|
||||
|
|
|
|||
Loading…
Reference in a new issue