# 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:** [February 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:** 1

<div class="post-metadata">

### Author: ![panic](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@panic](https://meta.discourse.org/u/panic)
#### Post date: [February 19, 2026, 2:49am UTC](https://meta.discourse.org/t/rich-text-editor-converts-bbcode-into-display-math/396463/1 "2026-02-19T02:49:27Z")

</div>

## Description

When pasting bbcode into rich text editor, brackets are escaped as \[and \]. However, this makes it a valid display math block, so it is erroneously rendered as math.

### Reproduction

1. Copy the following text

2. Paste into something like notepad.exe

3. Copy from notepad.exe to remove formatting information

4. Paste into rich text editor

5. The text should display as code; uncheck the “code” toggle button to make it plain text

Alternatively, you can type the bbcode shown above manually into the rich text editor.

### Expected behaviour

Either

> > **summary**
> >
> > some text

which is fine, since that is the original meaning of the bbcode, or

> [details=“summary”]  
> some text  
> [/details]

which is also fine, since that is what you see in the wysiwyg editor.

### Actual behaviour

> details="summary"
> 
> some text
> 
> /details

which is not fine.

---

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