Bug 521748 - The "Choose application" window is displaying [ and ] as %5B and %5D
Summary: The "Choose application" window is displaying [ and ] as %5B and %5D
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.7.0
Platform: CachyOS Linux
: HI normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
: 513957 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-06-19 12:16 UTC by Fernando Marcelino Muniz
Modified: 2026-07-21 04:45 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.6
Sentry Crash Report:


Attachments
Issue on Plasma (141.80 KB, image/png)
2026-06-19 12:16 UTC, Fernando Marcelino Muniz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Marcelino Muniz 2026-06-19 12:16:51 UTC
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
Comment 1 David Edmundson 2026-06-19 12:21:30 UTC
One can just rename a file, we don't need to use youtube-dl.

Marking as high as it's visually silly.
Comment 2 Bug Janitor Service 2026-06-30 12:52:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/596
Comment 3 David Redondo 2026-07-06 07:37:23 UTC
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
Comment 4 David Redondo 2026-07-06 07:57:34 UTC
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
Comment 5 David Redondo 2026-07-06 08:37:29 UTC
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
Comment 6 Fernando Marcelino Muniz 2026-07-21 04:45:52 UTC
*** Bug 513957 has been marked as a duplicate of this bug. ***