The cause may be one of these other involved modules, but as far as I can tell the culprit is Footnotes:

https://www.drupal.org/project/token_filter (8.x-1.1)

https://www.drupal.org/project/token_custom (8.x-1.0-alpha2)

https://www.drupal.org/project/token_custom_plus (8.x-1.0)

(I noticed it when using Custom Tokens Plus, but it seems to happen with just Custom Tokens and Token Filter.)

Consider a custom token [custom:test] with definition:

<span>TEST</span>

where that definition does NOT have a space after the SPAN close.

Use a text format with no editor and no other filters except Footnotes and Token Filter. No matter what the order of the filter, if you use the token as:

In brackets so can see extra space ([custom:test])

You get:

In brackets so can see extra space (TEST )

With an extra space before the closing bracket.

It does not seem to happen with all tokens (for example, using [node:nid] is fine).

Thanks for your work on this module, which is otherwise very useful.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webel created an issue. See original summary.

id.aleks’s picture

Issue tags: +LutskGCW20

@webel thanks for reporting this issue. We will check it shortly.

id.rem.dev’s picture

Assigned: Unassigned » id.rem.dev
id.rem.dev’s picture

Assigned: id.rem.dev » Unassigned
Status: Active » Needs review
FileSize
513 bytes

The issue was in this module. Improved text filter a little bit.

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

  • pifagor committed 1fb5f09 on 8.x-2.x authored by Vladimirrem
    Issue #3104491 by Vladimirrem, pifagor: Inserts extra space after Custom...
pifagor’s picture

Status: Reviewed & tested by the community » Patch (to be ported)
pifagor’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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