plugin text syntaxes: fix empty string handling in _remove_markups.

This commit is contained in:
Goffi 2024-06-05 22:33:37 +02:00
commit 99b218fca4

View file

@ -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")