←
TRCKR-267
Created: 2025-12-11
•
Updated: 2025-12-16
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-11
Successfully implemented markdown rendering for descriptions and comments.
**Implementation Details:**
- Added marked.js (v11.1.1) and DOMPurify (v3.0.8) libraries in base.html
- Created renderMarkdown() and renderAllMarkdown() JavaScript functions
- Applied markdown-content class to comment bodies across all templates
- Configured for GitHub Flavored Markdown with breaks support
- Sanitized HTML to prevent XSS attacks
**Files Modified:**
- server/templates/base.html - Added markdown libraries, CSS, and rendering functions
- server/templates/issue_detail.html - Applied markdown-content class to comments
- server/templates/modals/issue_detail.html - Applied to comments and worklogs
- server/templates/project_detail.html - Applied to comments
- server/templates/modals/project_detail.html - Applied to comments
- server/templates/milestone_detail.html - Applied to comments
- server/templates/modals/milestone_detail.html - Applied to comments
**Testing:**
- All 1165 tests passed
- Deployed to trckr.roboalch.com successfully
- Verified with chrome-devtools - markdown rendering works correctly for headings, bold, italic, code blocks, links, and blockquotes
**Edge Cases Handled:**
- Re-rendering after HTMX swaps (htmx:afterSwap event)
- Re-rendering after comment edits
- XSS prevention via DOMPurify whitelist
- Avoiding double-rendering with markdownRendered flag