From 2a3690d1c148da5dd799052403ba7290e1fb7de0 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 17 Nov 2022 19:31:00 -0700 Subject: Return images and summary in actor --- core/html.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/html.py') diff --git a/core/html.py b/core/html.py index fd41a50..5045b16 100644 --- a/core/html.py +++ b/core/html.py @@ -20,12 +20,13 @@ def sanitize_post(post_html: str) -> str: Only allows a, br, p and span tags, and class attributes. """ cleaner = bleach.Cleaner( - tags=["a", "br", "p", "span"], + tags=["br", "p"], attributes={ # type:ignore "a": allow_a, "p": ["class"], "span": ["class"], }, filters=[LinkifyFilter], + strip=True, ) return mark_safe(cleaner.clean(post_html)) -- cgit v1.2.3