Problem/Motivation

Trying to add a url in a Link field whit a query params that holds an url, the colon inside this query parameter is substitute with a %3A that not always works.
Example: The url https://www.mysite.com/mypath?target=https://my.other.site is escaped as https://www.mysite.com/mypath?target=https%3A//my.other.site inside the a tag and some site may not accept it as a parameter.

Steps to reproduce

- Create a content-type
- Add at least one Link field (with title)
- Create a new content
- Fill the link field with a url as written above
- The rendered link has a %3A in its query string

Proposed resolution

Inside the UrlHelper::buildQuery() function add the substitution of the colon escape character. I made a possible temporary workaround waiting for a better solution.

CommentFileSizeAuthor
url-geneterator-not-decoding-colon.patch639 bytescicciobat

Issue fork drupal-3558229

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cicciobat created an issue. See original summary.

cicciobat’s picture

Issue summary: View changes
mayurgajar’s picture

Assigned: Unassigned » mayurgajar
mayurgajar’s picture

Version: 10.5.x-dev » 11.x-dev

mayurgajar’s picture

MR: https://git.drupalcode.org/project/drupal/-/merge_requests/13892
It Needs Works as phpunit unit test fails.

mayurgajar’s picture

Assigned: mayurgajar » Unassigned

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.