Custom separator also used for string concatenation

Created on 15 June 2023, over 1 year ago
Updated 20 June 2023, over 1 year ago

Problem/Motivation

In ✨ Use custom delimiter instead of commas for multiple values Fixed the configurable separator/delimiter for text was introduced. This allows splitting up string values based on an arbitrary string. The same separator is currently used to join values together if the final value is a string.

This means, that we can't separate values in metatags fields by a special string and still produce "nice" results in html.
With a separator of "||" a taxonomy reference token would result in <meta name="NAME" content="term1||term2||term3">. This should be <meta name="NAME" content="term1,term2,term3">

Proposed resolution

Additional, separate, configurable combinator string used to combine results into a final string falling back to defaultSeparator value if not set.

Remaining tasks

- Review the proposed code
- Improve the test coverage

User interface changes

- Additional field to define the combinator

API changes

- New method MetatagSeparator::getCombinator()

Data model changes

- Additional setting "combinator"

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland pvbergen

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

Comments & Activities

Production build 0.71.5 2024