Allow both external and internal URLs to benefit from fragment splitting in the url() function

Created on 18 March 2019, almost 6 years ago
Updated 18 December 2023, about 1 year ago

Problem/Motivation

External URLs passed to the url() function automatically split off fragments for you, but internal URLs do not. This is a problem when authors enter relative URLs with fragments into a link field because those fragments end up getting URL encoded. For example, entering "foo#bar" in a link field will result in "/foo%23bar" on the screen (which will obviously not work as a page anchor link).

Proposed resolution

Since this functionality already exists inside the url() function it is a simple fix of moving the fragment splitting code block out of the external URL-only code block so that internal URLs can benefit as well.

πŸ› Bug report
Status

Needs review

Version

7.0 ⚰️

Component
BaseΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States daniel korte Brooklyn, NY

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