Add token_replace_plain filter

Created on 27 June 2024, 3 days ago

Problem/Motivation

When a token includes an & the token_replace filter uses the core \Drupal::token()->replace function which turns this into &
Give users a choice to use \Drupal::token()->replacePlain function by which the & will be displayed correctly.

Steps to reproduce

Replace a title with an & sign in it in twig by using the token_replace function
e.g. node.field_custom_title.value|token_replace

Proposed resolution

Make \Drupal::token()->replacePlain available to Twig Tweak filters

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands undersound3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024