From aa67f598dd75941acb0fa7e361341869d3c0c0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Mon, 11 Dec 2023 19:40:48 -0300 Subject: [PATCH] Explicitly set doctype to html5 when invoking tidy_document() Many tests break without this on newer versions of html-tidy. --- bookwyrm/tests/validate_html.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bookwyrm/tests/validate_html.py b/bookwyrm/tests/validate_html.py index 423a86586b..85e5c62777 100644 --- a/bookwyrm/tests/validate_html.py +++ b/bookwyrm/tests/validate_html.py @@ -8,6 +8,7 @@ def validate_html(html): _, errors = tidy_document( html.content, options={ + "doctype": "html5", "drop-empty-elements": False, "warn-proprietary-attributes": False, },