feat: support custom SVG bullet markers #2616
No reviewers
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
release-blocker
security
triage
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck!2616
Loading…
Reference in a new issue
No description provided.
Delete branch "jhermans/Ocideck:feat/custom-svg-bullets"
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?
Summary
Add
custom_svgas a third bullet-marker type alongsidedotandpaw, so authors can upload their own SVG and use it as the theme default or as a per-slide override.The SVG is stored inline in the style profile to keep decks portable and usable offline. That increases the amount of untrusted content handled by the deck format, so safety takes precedence over preserving every SVG feature: imports are capped at 256 KiB and sanitised before storage, with scripts, event handlers, animation, and external or
data:URLs removed. I would reconsider the inline approach if interoperability requires referenced assets, or if the allow-list cannot be kept aligned with the renderer.Changes
BulletMarker.customSvgwith the stable file-format tokencustom_svg.customBulletSvginline inThemeProfileand preserve it through JSON/style-profile and Markdown round trips.Checklist
git commit -s) per the DCO, with my real name and a reachable email.make check-fullpasses locally on the exact commit named in the PR before merge. Tested commit:663fdb774634470b1d94833d225fc3dad3ab6e9b. The Debian 12 production build completed successfully on this commit; the full maintainer gate has not been claimed.SVGis the standard technical acronym and is deliberately unchanged.docs/FILE_FORMAT.mdanddocs/FILE_FORMAT.nl.mdfor the new stored fields and directive value.docs/SECURITY_DESIGN.md(including HTML export sanitisation and the threat model) andassurance/risicoafweging.md. The threat model still holds: deck files and assets remain untrusted, custom SVG is bounded and sanitised before rendering/storage, no network access is added, and exported HTML retains its existing CSP/DOMPurify defence in depth.Notes for reviewers
Please pay particular attention to the SVG allow-list and to parity between Flutter preview rendering and HTML export. Manual check: select SVG under the theme bullet-marker setting, choose a local
.svg, verify bullets update in the editor, save/reopen the deck, and export to HTML while offline.Gemerged via #2652. De branch staat op een fork met
allow_maintainer_edituit, dus de poortfixes (dart format, ratchet-extractie van het marker-veld naarparts/settings_dialog_bullet_marker.dart,copyWith-baseline,SVGdoorl10n.d, sanitise-stabiele testinvoer) staan daar als eigen commits bovenop jouwfc1f9c151/663fdb774. Bedankt voor de bijdrage — de allow-list-aanpak op de SVG is precies de richtige kant op.Pull request closed