Fix bug with vanishing doctype

This commit is contained in:
Florian 2025-04-30 19:36:52 +02:00
parent 7d54677bb9
commit cc56bad408

View File

@ -37,4 +37,4 @@ def defragmentize(html):
re.escape(FRAGMENT_TAG), '', fragment.text)
return etree.tostring(dom, method='html', encoding='utf-8',
pretty_print=True).decode('utf-8')
pretty_print=True, doctype="<!DOCTYPE html>").decode('utf-8')