Bug 445071 - Fails to load images that contain a ` character.
Summary: Fails to load images that contain a ` character.
Status: RESOLVED FIXED
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Media Frame (show other bugs)
Version: 5.23.2
Platform: Archlinux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-06 12:25 UTC by northon_patrick3
Modified: 2021-11-10 21:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.23.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description northon_patrick3 2021-11-06 12:25:36 UTC
qml: Error while getting next image Error loading image: Malformed URL /home/elrick/Pictures/test%60test.webp.

The image contain a ` character and it fails to load.

SOFTWARE/OS VERSIONS
OS: Arch Linux
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 
Qt Version: 5.15.2
Comment 1 northon_patrick3 2021-11-08 01:23:30 UTC
More info:

```
QUrl url1{"/tmp/test`test.txt"};
std::cout << url1.toString(QUrl::PreferLocalFile).toStdString() << '\n';
QUrl url2{"file:///tmp/test`test.txt"};
std::cout << url2.toString(QUrl::PreferLocalFile).toStdString() << '\n';
```

will output:
```
/tmp/test%60test.txt
/tmp/test`test.txt
```
Comment 2 Bug Janitor Service 2021-11-08 16:40:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/95
Comment 3 Bug Janitor Service 2021-11-08 16:40:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/95
Comment 4 northon_patrick3 2021-11-10 21:23:01 UTC
Git commit 181cc49c4d44a4ac926051ebf9a53d0a8fc6b253 by Patrick Northon.
Committed on 08/11/2021 at 16:34.
Pushed by ngraham into branch 'master'.

[mediaframe] Make files added from paths into URLs.

This make it consistent with individual files added and fix a problem where the url isn't converted to a path properly in some conditions when the url doesn't contain the schema (file://).

M  +1    -1    applets/mediaframe/plugin/mediaframe.cpp

https://invent.kde.org/plasma/kdeplasma-addons/commit/181cc49c4d44a4ac926051ebf9a53d0a8fc6b253
Comment 5 Nate Graham 2021-11-10 21:23:37 UTC
Git commit 5e16b5ab644748fbf38c2b7fa7113d8dc99bcc28 by Nate Graham, on behalf of Patrick Northon.
Committed on 10/11/2021 at 21:23.
Pushed by ngraham into branch 'Plasma/5.23'.

[mediaframe] Make files added from paths into URLs.

This make it consistent with individual files added and fix a problem where the url isn't converted to a path properly in some conditions when the url doesn't contain the schema (file://).


(cherry picked from commit 181cc49c4d44a4ac926051ebf9a53d0a8fc6b253)

M  +1    -1    applets/mediaframe/plugin/mediaframe.cpp

https://invent.kde.org/plasma/kdeplasma-addons/commit/5e16b5ab644748fbf38c2b7fa7113d8dc99bcc28