fix(ui): render task-list checkboxes in Markdown descriptions (PMS-347) #177
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-309-followup-tasklist-checkboxes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements PMS-347 (follow-up to PMS-309).
Problem
Markdown renders, but task-list checkboxes (
- [ ]/- [x]) showed as plain text.render_markdownenablesENABLE_TASKLISTS, so pulldown-cmark emits<input disabled type="checkbox">, but the defaultammonia::cleanallowlist drops<input>, leaving only the label.Fix (
src/utils/markdown.rs)Use an
ammonia::Builderthat allows a disabled checkbox input: taginputwithchecked/disabled, plustyperestricted tocheckboxviaadd_tag_attribute_values(deliberately kept out of the generic attribute allowlist, which would otherwise allow anytypevalue). Checkboxes render disabled (read-only). All other scrubbing unchanged.Verification
just pre-commit(pinned rust 1.94 = CI) passes: fmt, clippy-D warnings, wasm check, 93 lib tests (2 new: task-list renders checkboxes; non-checkbox inputs are still stripped).🤖 Generated with Claude Code