[MT-23016] Resolve inline CID images safely in HTML previews#41
Conversation
Emails embed inline images as MIME parts referenced via cid: URLs (RFC 2392), which browsers cannot resolve, so the HTML tab's preview iframe rendered them as broken icons. The backend already serves part bytes by part_id with the original Content-Type, and the message JSON carries content_id for inline parts + attachments — nothing rewrote the references. Rewrite cid:<content-id> refs to origin-absolute part URLs before handing the HTML to MessagePreview (absolute so they also resolve in the blob:-based "open in new tab" popout). The HTML Source tab keeps the original markup. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
What & why
Fixes MT-23016, a sub-task of MT-22849.
Browsers cannot resolve MIME
cid:references directly. The preview now maps known content IDs in HTML URL attributes and CSSurl()values to the existing attachment-part endpoint. Matching is intentionally limited to URL contexts so visible message text is never rewritten.Impact
Inline images render in the HTML preview and popout while HTML Source remains unchanged.
Screenshots
Verification
npm test— 67 tests passednpm run lint— 0 errors; 4 existing warningsnpm run build— passedgit diff --check main...fix/mt-23016-inline-cid-images— passed