# Rich text editor converts bbcode into display math

**URL:** <https://meta.discourse.org/t/rich-text-editor-converts-bbcode-into-display-math/396463>\
**Category:** Bug\
**Tags:** composer, markdown, math\
**Created:** [19 בפברואר,‏ 2026,‏ 2:49am UTC](https://meta.discourse.org/t/rich-text-editor-converts-bbcode-into-display-math/396463 "2026-02-19T02:49:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [20 בפברואר,‏ 2026,‏ 12:20am UTC](https://meta.discourse.org/t/rich-text-editor-converts-bbcode-into-display-math/396463/4 "2026-02-20T00:20:20Z")

</div>

If you have people pasting bbcode, you can try disabling `discourse_math_enable_latex_delimiters`.

But I also can’t reproduce the problem. In my case what was available on the clipboard was:

```plaintext
Formats: TIMESTAMP,TARGETS,SAVE_TARGETS,MULTIPLE,STRING,UTF8_STRING,TEXT,text/plain,text/plain;charset=utf-8,chromium/x-internal-source-rfh-token,chromium/x-source-url
'[details="summary"]\nsome text\n[/details]'

```

or the plain version:

```plaintext
Formats: TARGETS,UTF8_STRING
'[details="summary"]\nsome plain text\n[/details]\n'

```

Using browser copy/paste (instead of the copy button) I had on my clipboard:

```plaintext
Formats: TIMESTAMP,TARGETS,SAVE_TARGETS,MULTIPLE,STRING,UTF8_STRING,TEXT,text/html,text/plain,text/plain;charset=utf-8,chromium/x-internal-source-rfh-token,chromium/x-source-url
UTF8_STRING:
b'[details="summary"]\nsome text\n[/details]'
text/html:
b'<span style="color: rgb(199, 199, 199); font-family: &quot;JetBrains Mono&quot;, Consolas, Monaco, monospace; font-size: 15.75px; font-style: normal; font-variant-ligatures: none; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre; background-color: rgba(0, 0, 0, 0.25); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">[details="summary"]\nsome text\n[/details]</span>'
text/plain:
b'[details="summary"]\nsome text\n[/details]'
text/plain;charset=utf-8:
b'[details="summary"]\nsome text\n[/details]'

```

but even that pasted fine.

---

_[View the full topic](https://meta.discourse.org/t/rich-text-editor-converts-bbcode-into-display-math/396463)._
