Fixed Copy&pasting & select-quoting [plain] tag doesn't work

Xon

Well-known member
Licensed customer
Affected version
2.3.12
If you select [color=red], and click quote/reply in the pop-up this strips the plain tags and leaves a dangling color tag. This also applies to copy & paste support.

In XF\BbCode\Renderer\Html::addDefaultTags();
PHP:
$this->addTag('plain', [
    'replace' => ['', ''],
]);
This should be;
PHP:
$this->addTag('plain', [
    'replace' => ['<span class="bbPlain">', '</span>'],
]);

Then the paste javascript handler can convert span.bbPlain into a [plain][/plain] tag wrappers, and XF\Html\Renderer\BbCode can do something similar.
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.13).

Change log:
Preserve rendered formatting through quoting and pasting
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom