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:
Shaun Kruger
2026-12-01 20:57:31 -07:00
co-authored by Claude Opus 5.5
parent 3fe49b47ea
commit 5bb9a70c11
6 changed files with 74 additions and 1 deletions
+8
View File
@@ -16,3 +16,11 @@ form.simpleform label {
font-weight: bold;
font-size: 1.2em;
}
div.tox-tinymce div.tox-promotion {
display: none;
}
//span.tox-statusbar__branding {
// display: none;
//}