Hyphen character in URL causes linebreak

Created on 8 February 2025, 2 months ago

Problem/Motivation

When the URL of an image contains a hyphen character like in the folder name '2025-1', the output of the Schema.org Article Module will look like this:

"url": [
                    "https://site.com/sites/default/files/styles/large/public/2025",
                    "01/GX011868.jpg?itok=8wgYEmNN"
                ]

instead of this

"url": [
                    "https://site.com/sites/default/files/styles/large/public/2025-01/GX011868.jpg?itok=8wgYEmNN"
                ]

Steps to reproduce

Add an image object to a Schema.org Article with an image url containing a hyphen character.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇭Switzerland suldan

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

Comments & Activities

  • Issue created by @suldan
  • 🇨🇭Switzerland suldan

    The reason for the behavior was in the Metatag Settings > Metatag Trimming Options > Characters to trim! After removing the "-" from the list, the schema.org article image url is rendered correctly.

Production build 0.71.5 2024