Fix for issue 3192362 causes problems with # or ? in audio file name

Created on 30 November 2024, 19 days ago

Problem/Motivation

Want to use audio files that contain the '#' character in name. Eg Episode 1 is "Episode #1.mp3".

Steps to reproduce

  1. Use "url to file" as the views field formatter for the Audio file's URL field
  2. Use an audio file located at "/relative-path/Episode #1.mp3"
  3. In buildElementForLink() the path "/relative-path/Episode #1.mp3" is treated by Url::fromUserInput() as a path "/relative-path/Episode " with a fragment "1.mp3"

Proposed resolution

Prefix the path with 'base:' and use Url::fromUri() rather than Url::fromUserInput(). This avoids the double-encoding as Issue 3192362 intended, without breaking files that use "#" and "?". Patch supplied.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia kenwest

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024