KamoCRM

Prevent double-wrapping of full-document bodyHtml in block designer

Fixkamo-internal
Shipped
19 ஏப்ரல், 2026 அன்று 12:29 AM UTC
Author
kamo
Commit
4963a53

When bodyBlocks is null and bodyHtml is a full <!DOCTYPE html> document (e.g. canonical seeded templates), importing it as a single block caused serializeFullEmailHtml to wrap it in a second <!DOCTYPE html> shell. Email clients then stripped the nested document, showing only inner content with no outer frame. Fix: skip the block-import fallback for full HTML documents; start with an empty block editor instead. The canonical bodyHtml continues to serve as the default email until the admin customizes via the block designer. Also fix handleSave dep array: replace serializeBlocksToHtml (not called directly) with serializeFullEmailHtml so stale closures are avoided when logo/title options change before saving.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing