From 101b1b6a23f5f1fdd97973ba8a032661e9f072d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 29 Dec 2022 17:25:30 +0000 Subject: [PATCH] fix(api): Add href to protected attributes Part-of: --- api/funkwhale_api/common/utils.py | 2 +- changes/changelog.d/2023.bugfix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/2023.bugfix diff --git a/api/funkwhale_api/common/utils.py b/api/funkwhale_api/common/utils.py index 0863488f5..f0d4b1970 100644 --- a/api/funkwhale_api/common/utils.py +++ b/api/funkwhale_api/common/utils.py @@ -308,7 +308,7 @@ HTMl_CLEANER = bleach.sanitizer.Cleaner(strip=True, tags=SAFE_TAGS) HTML_PERMISSIVE_CLEANER = bleach.sanitizer.Cleaner( strip=True, tags=SAFE_TAGS + ["h1", "h2", "h3", "h4", "h5", "h6", "div", "section", "article"], - attributes=["class", "rel", "alt", "title"], + attributes=["class", "rel", "alt", "title", "href"], ) # support for additional tlds diff --git a/changes/changelog.d/2023.bugfix b/changes/changelog.d/2023.bugfix new file mode 100644 index 000000000..f139fd55d --- /dev/null +++ b/changes/changelog.d/2023.bugfix @@ -0,0 +1 @@ +Fixed an issue which caused links in Markdown forms to not render correctly. (#2023)