backend: various fixes, and type hints improvments.

This commit is contained in:
Goffi 2025-08-03 23:36:22 +02:00
commit 3dbd990902

View file

@ -404,7 +404,7 @@ class TextSyntaxes(object):
"""
return " ".join(SAFE_CLASSES.intersection(classes_raw.split()))
def clean_xhtml(self, xhtml):
def clean_xhtml(self, xhtml) -> str:
"""Clean XHTML text by removing potentially dangerous/malicious parts
@param xhtml(unicode, lxml.etree._Element): raw HTML/XHTML text to clean