Something is stripping the style attributes out of the markup in the "What you get" column of the compose tips.

The tags work normally in actual usage.

I suspect there's a filter-step interfering somewhere, let's see if we can fix this without opening a core issue.

Issue fork xbbcode-3336436

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cburschka created an issue. See original summary.

cburschka’s picture

This issue appears to have already existed in 9.4.8.

cburschka’s picture

Correction, the issue has always existed when returning Filter::tips() as a string instead of Markup. This was introduced by #3207134: Add strict types to xbbcode, which in a twist of dramatic irony does mention "methods which can return strings or MarkupInterface" as a potential obstacle, but fails to recognize that Filter::tips() is such a method.

Due to PHP silently casting the return value to string in methods that are hinted as string (instead of triggering a type error), this was not previously discovered.

cburschka’s picture

Status: Active » Needs review

Pushing a test-only patch. This should fail.

cburschka’s picture

Pushing the fix. This should pass.

  • cburschka committed 706289c4 on 5.0.x
    Issue #3336436: Compose tips page doesn't render [font] or [color]...
cburschka’s picture

Version: 5.0.x-dev » 4.0.x-dev

This probably needs to be backported to 4.0.x, because the strict return types were in there as well.

  • cburschka committed 2f5f65d8 on 4.0.x
    Issue #3336436: Compose tips page doesn't render [font] or [color]...
cburschka’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.