Why do `<button>` tags render in the preview, but not the rendered post?

Problem

The <button> tag doesn’t render in rendered posts, but does in the editor preview.

Verification

Source Markup

The undermentioned source markup’s <button> tags:

That is, the "<button disabled>🗑︎</button>" and "<button disabled>Deselect</button>" buttons. They're `#000000`, with gradients:

![Screenshot_20250325_134658|690x386](upload://lmBA8eMFW84XApc0wTSX2uS70zJ.png)

…render in the previewer:

Rendered

However, they do not in the rendered post:

  1. Example

  2. Confirmation

Hi - does what you’re asking about in the topic header work in Discourse upstream? If it’s the same there, then I’d assume that’s a Discourse thing and not specific to KDE Discuss?

And just FYI, it’s hard to see exactly what you’re demonstrating in the body of your post with the abundance of formatting elements - numeric list, blockquoting, headers, and expandable / collapsible sections with large screenshots - and lack of a concise written statement of what you tried and what you experienced :slight_smile:

1 Like

Yeah, it’s upstream. [1] Didn’t think to check. Thanks:


  1. web.archive.org’s copy of try.discourse.org/t/1500/1 [2] ↩︎

  2. meta.discourse.org/t/257782/2 ↩︎

I’ve tried to improve it. However:

For nested headings, I don’t know of an alternative to an li container for demonstrating hierarchy until github.com/whatwg/html/issues/8751’s been implemented:

I don’t think <dd> and <dt> are suitable replacements, and they’re certainly not convenient to use with CommonMark.


…that’s the price of semantic HTML, I think. I don’t control the CSS here, but I do control whether what I write adheres to W3C guidance.


I expected it’d make the post slightly easier to understand, since the reader can hide what’s important in some cases, but not theirs. In this case, I needed to add screenshots in case the rendering changes server-side, but they remain fairly useless until then.


Thanks. I’ll add it:

The <button> tag doesn’t render in rendered posts, but does in the editor preview.