Dashboard publish/save strips inline HTML from post body (API does not)

Hello Elements support team,

I’ve run into a reproducible issue on my site (followingpaul.org, Posts collection) where publishing or saving a post through the CMS dashboard removes inline HTML from the post body, while the same operations through the API/connector preserve it.

Where it bites me: my articles mark Scripture in red using inline spans, e.g.

<span style="color:#B9361E">"...quoted verse..."</span>

When a post is created or updated through the API, these spans are stored and rendered exactly as written. But the first time the post is saved or published from the dashboard, every one of those <span> tags is stripped out of the stored body, leaving plain text — so all of the red Scripture formatting silently disappears from the article.

What is stripped vs. kept: only raw inline HTML is removed. Markdown is untouched — headings (####) and emphasis (*italics*) survive the dashboard save; the <span style="color:...">...</span> wrappers do not.

Steps to reproduce:

  1. Create a post whose markdown body contains an inline HTML span, e.g. <span style="color:#B9361E">"test"</span> (reference).
  2. Confirm the span is present in the stored body (it is, when created/updated via the API).
  3. Open the post in the dashboard and save or flip its status to published.
  4. Re-read the stored body — the <span ...>...</span> wrappers are gone; only the plain text remains.

I verified this with a controlled test: an identical draft kept its spans through API create, an API field change, and an API status-flip to published; the moment it was published from the dashboard, the spans were removed from storage.

My questions:

  1. Is the dashboard save intentionally sanitizing/stripping inline HTML from the post body? If so, is that expected to differ from the API path (which preserves it)?
  2. Is there a setting or an allowlist so that inline HTML — at minimum a <span> with a style/color attribute — is preserved when saving/publishing from the dashboard?
  3. If this is a bug rather than a configuration option, can it be addressed so the dashboard and API handle the body consistently?

For now I’m working around it by publishing and editing these articles only through the API, but I’d like the dashboard to be safe to use for them as well.

Site: followingpaul.org (Elements CMS) Collection: Posts Content: Markdown post bodies containing inline HTML <span> elements

Thank you for taking a look.

Best regards, Edward Cross

Hi @ercross

That does indeed look like a bug, I’ve logged it and we’ll get it fixed as soon as we can :slight_smile: