Fix Markdown rendering in federated template-site posts #313

Merged
erik merged 2 commits from fix/task-37215f03-federated-markdown into main 2026-10-29 16:54:14 -05:00
Owner

Summary

Fix literal Markdown in federated notes and link commentary by rendering safe, portable HTML on the template-site server. No CLI conversion or stored-source rewrite.

Task

task-37215f03 — Fix Markdown rendering in federated template-site posts

Changes

  • Add a site-owned renderer using the existing markdown-it dependency, with raw HTML disabled, safe URL schemes, canonical absolute references, portable headings/list paragraphs and labeled image-link fallback.
  • Use one outgoing-object builder for Create/Update delivery, outbox entries and newly wired content-negotiated individual post object retrieval. Preserve browser pages, unpublished-post privacy and article permalink-only federation.
  • Keep the existing Markdown content model, stored source, management API shape, package versions/pins and CLI behavior unchanged.
  • Document existing-site adoption and separately authorized recovery of already-federated notes. No production deployment, post edits or release publication performed.

Testing

  • ./scripts/pre-pr.sh passes (build/API checks, generated CSS, formatting, lint, types, full local tests).
  • Unit regressions cover formatting, ordinary text, escaped punctuation, canonical URLs, raw HTML/unsafe schemes and source/identity preservation.
  • Local-only federation integration regressions verify matching Create/Update/outbox/object content for notes and links, unchanged-source edit delivery, browser HTML and draft/missing-post privacy.
  • Live cross-server rendering checks — not performed; no production mutations authorized.

Checklist

  • Documentation updated.
  • No new dependencies, database migrations or API contract changes.
  • No integration/browser/container tests or runtime setup added to CI.

Delivery status

  • Head: 3cecffb307.
  • Local ./scripts/pre-pr.sh: passed, including full local integration coverage.
  • Forgejo CI: task #562 build-lint-test succeeded for this head (CI uses test:ci).
  • Independent pr-review: initial linked-image nested-anchor finding fixed and regression added; re-review found no actionable issues. Review covered the supplied full diff and relevant surrounding source; the reviewer did not run commands or independently verify CI. Live receiving-server display and edit adoption remain untested.
  • Merge pending explicit human approval. No deployment, release, or production note edits performed.
## Summary Fix literal Markdown in federated notes and link commentary by rendering safe, portable HTML on the template-site server. No CLI conversion or stored-source rewrite. ## Task task-37215f03 — Fix Markdown rendering in federated template-site posts ## Changes - Add a site-owned renderer using the existing markdown-it dependency, with raw HTML disabled, safe URL schemes, canonical absolute references, portable headings/list paragraphs and labeled image-link fallback. - Use one outgoing-object builder for Create/Update delivery, outbox entries and newly wired content-negotiated individual post object retrieval. Preserve browser pages, unpublished-post privacy and article permalink-only federation. - Keep the existing Markdown content model, stored source, management API shape, package versions/pins and CLI behavior unchanged. - Document existing-site adoption and separately authorized recovery of already-federated notes. No production deployment, post edits or release publication performed. ## Testing - [x] `./scripts/pre-pr.sh` passes (build/API checks, generated CSS, formatting, lint, types, full local tests). - [x] Unit regressions cover formatting, ordinary text, escaped punctuation, canonical URLs, raw HTML/unsafe schemes and source/identity preservation. - [x] Local-only federation integration regressions verify matching Create/Update/outbox/object content for notes and links, unchanged-source edit delivery, browser HTML and draft/missing-post privacy. - [ ] Live cross-server rendering checks — not performed; no production mutations authorized. ## Checklist - [x] Documentation updated. - [x] No new dependencies, database migrations or API contract changes. - [x] No integration/browser/container tests or runtime setup added to CI. ## Delivery status - Head: `3cecffb307`. - Local `./scripts/pre-pr.sh`: passed, including full local integration coverage. - Forgejo CI: task #562 `build-lint-test` succeeded for this head (CI uses `test:ci`). - Independent pr-review: initial linked-image nested-anchor finding fixed and regression added; re-review found no actionable issues. Review covered the supplied full diff and relevant surrounding source; the reviewer did not run commands or independently verify CI. Live receiving-server display and edit adoption remain untested. - Merge pending explicit human approval. No deployment, release, or production note edits performed.
fix: render federated template-site posts as safe Markdown HTML
All checks were successful
CI / build-lint-test (pull_request) Successful in 1m1s
cdee6a447b
Task: #task-37215f03
fix: preserve outer links around federated image labels
All checks were successful
CI / build-lint-test (pull_request) Successful in 1m1s
3cecffb307
Task: #task-37215f03
erik merged commit b2d0cbe238 into main 2026-10-29 16:54:14 -05:00
erik deleted branch fix/task-37215f03-federated-markdown 2026-10-29 16:54:14 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit!313
No description provided.