Fixed HTML to BB Code does not convert code blocks to [ICODE] or [CODE]

Affected version
XF 2.1.8 PL2

TickTackk

Well-known member
From PHP side:
After: upload\src\XF\Html\Renderer\BbCode.php:56 add
PHP:
'code'       => ['filterCallback' => ['$this', 'handleTagCode'], 'skipCss' => true]
After: upload\src\XF\Html\Renderer\BbCode.php:929 add the contents from the attachment.

This can be mostly be replicated when using feed reader to create threads or any third party add-on that wants to convert HTML to BB Code formatted message. Will also need to handle this maybe when copy-pasting but it's hard to debug with not having full frololola source 😣
 

Attachments

  • XF-T178943-FIX.txt
    386 bytes · Views: 8

Chris D

XenForo developer
Staff member
Will also need to handle this maybe when copy-pasting but it's hard to debug with not having full frololola source
We don't generally attempt to retain block formatting when copy/pasting, but we do already handle this correctly via select-to-quote.

Thanks for the patch though that's fixed for the next release.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
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.1.10).

Change log:
Attempt to convert incoming <code> tags to relevant BB code.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top