Skip to content

fix(campaigns): strip HTML wrapper from body when loading stored steps#150

Merged
Rishavraaj merged 1 commit into
mainfrom
fix/campaign-body-html-rendering
Jun 4, 2026
Merged

fix(campaigns): strip HTML wrapper from body when loading stored steps#150
Rishavraaj merged 1 commit into
mainfrom
fix/campaign-body-html-rendering

Conversation

@anujeet98

Copy link
Copy Markdown
Contributor

Changes:

  • Apollo wraps stored email body content in a full HTML document (...) when returning it via the API. This caused the raw HTML to render as literal text in the step body textarea when editing a campaign.
  • Uses DOMParser to extract clean plain text from the stored body_html before populating the editor, leveraging the browser's native HTML engine instead of fragile regex.

before:
image

after:
image

Apollo wraps stored email body content in a full HTML document
(<html><head></head><body>...</body></html>) when returning it via the API.
This caused the raw HTML to render as literal text in the step body textarea
when editing a campaign.

Uses DOMParser to extract clean plain text from the stored body_html before
populating the editor, leveraging the browser's native HTML engine instead
of fragile regex.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@anujeet98 anujeet98 force-pushed the fix/campaign-body-html-rendering branch from eea1e9c to 08c68db Compare June 4, 2026 10:14
@Rishavraaj Rishavraaj merged commit a629655 into main Jun 4, 2026
2 checks passed
@Rishavraaj Rishavraaj deleted the fix/campaign-body-html-rendering branch June 4, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants