External links cannot have empty query parameters

Created on 12 December 2019, over 5 years ago
Updated 30 December 2024, 8 months ago

For an external link if query parameters are added and if the value is empty, then "=" is included in the url.
when the query param is empty, only the key should be added to the url.

Steps to reproduce

- Add a link field to any content type
- Allow external links for the field.
- Add a new content and fill the link with query parameters
eg: https://www.drupal.org?q=123&test=
- The link will be displayed as https://www.drupal.org?q=123&test= on FE

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

link.module

Created by

🇮🇳India venugopp Bangalore

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