Created attachment 193356 [details] Issue on Plasma STEPS TO REPRODUCE 1. Download a YouTube video with yt-dlp. 2. Right-Click on the video, then click on "Open with > Another app..." 3. Read the name of the file. OBSERVED RESULT [ and ] are being shown as %5B and %5D EXPECTED RESULT The "Choose application" window should properly display the file's characters. SOFTWARE/OS VERSIONS Operating System: CachyOS Linux KDE Plasma Version: 6.7.0 KDE Frameworks Version: 6.27.0 Qt Version: 6.11.1 Kernel Version: 7.0.12-1-cachyos (64-bit) Graphics Platform: Wayland Processors: 8 × 11th Gen Intel® Core™ i5-11300H @ 3.10GHz Memory: 9 GB of RAM (8.1 GB usable) Graphics Processor 1: Intel® Iris® Xe Graphics Graphics Processor 2: NVIDIA GeForce GTX 1650 Manufacturer: LENOVO Product Name: 82MG System Version: IdeaPad Gaming 3 15IHU6
One can just rename a file, we don't need to use youtube-dl. Marking as high as it's visually silly.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/596
Git commit db2cd7a90ce279cb126f2509e708a31863ddc265 by David Redondo. Committed on 06/07/2026 at 07:29. Pushed by davidre into branch 'master'. appchooser: Unconfuse url vs filename The code was a bit confused whether to pass a file name, url or some display string to the dialog. The portal path always passed the file name for local files, for other URIs would fallback to the mime type instead of the URI. The private plasma path would pass a URL as string which the dialog would wrap into another url, which somehow breaks the decoding when retrieving the filename. When multiple files are passed it used a free form string, the code in the dialog obviously doesnt make sense then. Disentangle this by making it clear you are passing a display string, convert the url string to an url directly. The portal always passes content-type, move resolving of the mimetype to the private entry point where we can deal with the url. FIXED-IN:6.6.6 M +19 -8 src/appchooser.cpp M +12 -19 src/appchooserdialog.cpp M +1 -1 src/appchooserdialog.h https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/db2cd7a90ce279cb126f2509e708a31863ddc265
Git commit 1f244dc3753ea423a2528f542ba1e1b160f02a6d by David Redondo. Committed on 06/07/2026 at 07:50. Pushed by davidre into branch 'Plasma/6.7'. appchooser: Unconfuse url vs filename The code was a bit confused whether to pass a file name, url or some display string to the dialog. The portal path always passed the file name for local files, for other URIs would fallback to the mime type instead of the URI. The private plasma path would pass a URL as string which the dialog would wrap into another url, which somehow breaks the decoding when retrieving the filename. When multiple files are passed it used a free form string, the code in the dialog obviously doesnt make sense then. Disentangle this by making it clear you are passing a display string, convert the url string to an url directly. The portal always passes content-type, move resolving of the mimetype to the private entry point where we can deal with the url. FIXED-IN:6.6.6 (cherry picked from commit db2cd7a90ce279cb126f2509e708a31863ddc265) Co-authored-by: David Redondo <kde@david-redondo.de> M +19 -8 src/appchooser.cpp M +12 -19 src/appchooserdialog.cpp M +1 -1 src/appchooserdialog.h https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/1f244dc3753ea423a2528f542ba1e1b160f02a6d
Git commit b9d06180bd65966fc3f5a119910a64aaf73a702a by David Redondo. Committed on 06/07/2026 at 08:16. Pushed by davidre into branch 'Plasma/6.6'. appchooser: Unconfuse url vs filename The code was a bit confused whether to pass a file name, url or some display string to the dialog. The portal path always passed the file name for local files, for other URIs would fallback to the mime type instead of the URI. The private plasma path would pass a URL as string which the dialog would wrap into another url, which somehow breaks the decoding when retrieving the filename. When multiple files are passed it used a free form string, the code in the dialog obviously doesnt make sense then. Disentangle this by making it clear you are passing a display string, convert the url string to an url directly. The portal always passes content-type, move resolving of the mimetype to the private entry point where we can deal with the url. FIXED-IN:6.6.6 (cherry picked from commit db2cd7a90ce279cb126f2509e708a31863ddc265) Co-authored-by: David Redondo <kde@david-redondo.de> (cherry picked from commit 1f244dc3753ea423a2528f542ba1e1b160f02a6d) Co-authored-by: David Redondo <kde@david-redondo.de> M +19 -8 src/appchooser.cpp M +12 -19 src/appchooserdialog.cpp M +1 -1 src/appchooserdialog.h https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/b9d06180bd65966fc3f5a119910a64aaf73a702a
*** Bug 513957 has been marked as a duplicate of this bug. ***