Skip to content

[2.x] fix(mentions): keep spoilers hidden when quoting - #5406

Open
jayhemnani9910 wants to merge 1 commit into
flarum:2.xfrom
jayhemnani9910:fix/quote-keeps-spoiler
Open

jayhemnani9910 wants to merge 1 commit into
flarum:2.xfrom
jayhemnani9910:fix/quote-keeps-spoiler

Conversation

@jayhemnani9910

Copy link
Copy Markdown

Fixes #5323

Quoting a selection that includes a spoiler turned it into plain text, so the new post showed it to everyone. selectedText now writes inline and block spoilers back as >!text!< and >! text.

A selection made entirely inside a spoiler is still quoted as plain text, because the selection has no spoiler element in it.

Added tests to selectedText.test.ts. They fail without the change. I ran the mentions Jest suite, not a live forum.

@jayhemnani9910
jayhemnani9910 requested a review from a team as a code owner November 5, 2026 15:25
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.

When quoting text with a spoiler text, the spoiler is removed

1 participant