GET question mark is not excaped in custom url when concatenated after an empty token

Created on 21 August 2018, almost 7 years ago
Updated 2 June 2025, 3 days ago

I encountered trivial edge case bug, that i wanted to document.

I'm using the field group link in a paragraph bundle containing a link field
if the fieldgroup link is a Custom URL with a token concatenated with an get parameter (eg. ?test)
and the the token result is empty

eg :
[paragraphs_item:field-paragraph-link:display_url]?test
but the field pargraph_link is empty

then the link is generated but the "?" is not escaped and is then replaced by
/%3Ftest
instead of /?test (on the current url) here on homepage)
which leads to a 404

If the field field-paragraph-link is not empty, then the href is ok and get is escaped correctly
giving something like
/myurlvalue?test

🐛 Bug report
Status

Closed: outdated

Version

1.5

Component

Code

Created by

🇫🇷France ericdsd France

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024