Prevent doubled-slash on internal links

Created on 9 July 2013, about 12 years ago
Updated 2 June 2025, 3 months ago

If a link field is used with an internal URL and the link field is set to plain text link, we get internal URLs passed to the Linked Field module that look like:
/internal-alias

When this is run through the url() function it doubles the preceding slash (see this stackoverflow for similar http://drupal.stackexchange.com/q/72441/6581).

We end up with //internal-alias as the URL used.

I've added a three-line patch that tests to see if the URL is internal to Drupal and if so, resolves to the internal alias so url() can do it's magic properly.

πŸ› Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sokrplare

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