diff --git a/libervia/backend/plugins/plugin_misc_text_syntaxes.py b/libervia/backend/plugins/plugin_misc_text_syntaxes.py index 64fd01cf..a897c849 100644 --- a/libervia/backend/plugins/plugin_misc_text_syntaxes.py +++ b/libervia/backend/plugins/plugin_misc_text_syntaxes.py @@ -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")