RSS Feed/News [ICODE=rich] does not round-trip after editing a post as expected.

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
26,920
Points
823

Reputation:

If you have the bb-code:
Test
It is rendered in the editor as:
<p><code><span style="color: rgb(0, 255, 255);">Test</span></code></p>
And then edit the post it gets saved as:
[COLOR=rgb(0, 255, 255)]Test[/COLOR]

The problem is XF\BbCode\Renderer\EditorHtml::addDefaultTags has the following code:
PHP:

$this->addTag('icode', ['replace' => ['<code>', '</code>']]);
And XF\Html\Renderer\BbCode::handleTagCode just outputs /[code] without any css... [URL='https://xenforo.com/community/threads/icode-rich-does-not-round-trip-after-editing-a-post-as-expected.220867/']Read more[/URL] [url="https://xenforo.com/community/threads/icode-rich-does-not-round-trip-after-editing-a-post-as-expected.220867/"]Continue reading...[/url]
 
Status
Not open for further replies.
Top