adjusts html saniziter settings to match expected types

This commit is contained in:
gridtime 2024-02-06 11:48:03 +01:00
parent bd1bc59859
commit 0e6e55a920
No known key found for this signature in database
GPG Key ID: FB6ACC7A1C9182F8

View File

@ -268,11 +268,11 @@ class HTMLProcessor:
return {
"tags": inline_tags if inline else all_tags,
"attributes": inlines_attributes if inline else attributes,
"empty": {} if inline else {"hr", "br", "img"},
"separate": {"a"} if inline else {
"empty": set() if inline else set({"hr", "br", "img"}),
"separate": set({"a"}) if inline else set({
"a", "p", "li", "table", "tr", "th", "td", "br", "hr", "img",
},
"whitespace": {},
}),
"whitespace": set(),
"keep_typographic_whitespace": True,
"add_nofollow": False,
"autolink": {