Add sanitized rich-text descriptions for content assets
Introduce HtmlTextField, which cleans submitted HTML with nh3 against a tag/attribute allowlist, and use it for ContentAsset.description via Meta.field_classes. Edit descriptions with TinyMCE and render the sanitized HTML on the asset page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3fe49b47ea
commit
5bb9a70c11
@@ -16,6 +16,7 @@ dependencies = [
|
||||
"whitenoise~=6.11.0",
|
||||
"pytz~=2026.5",
|
||||
"django-allauth[socialaccount]~=65.0.2",
|
||||
"nh3==0.2.20",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user