# HG changeset patch # User Goffi # Date 1717619617 -7200 # Node ID ba28ca268f4a1b6cd59dce483e8c63e75f579a5a # Parent 810f2b80146bb750f0438349f1492408c14b35f3 plugin text syntaxes: fix empty string handling in `_remove_markups`. diff -r 810f2b80146b -r ba28ca268f4a libervia/backend/plugins/plugin_misc_text_syntaxes.py --- a/libervia/backend/plugins/plugin_misc_text_syntaxes.py Wed Jun 05 22:24:18 2024 +0200 +++ b/libervia/backend/plugins/plugin_misc_text_syntaxes.py Wed Jun 05 22:33:37 2024 +0200 @@ -475,5 +475,7 @@ @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")