Bug 420791 - "%"-symbol in bookmark address appears like "%25"
Summary: "%"-symbol in bookmark address appears like "%25"
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: bookmark (show other bugs)
Version: 20.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-30 09:31 UTC by SimPS
Modified: 2020-05-05 01:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08.0


Attachments
Visual representation of the bug (60.50 KB, image/png)
2020-04-30 09:42 UTC, Yaroslav Sidlovsky
Details
konsole_fix_bookmark_command_being_percent_encoded.patch (1.64 KB, patch)
2020-04-30 09:47 UTC, Yaroslav Sidlovsky
Details
konsole_fix_bookmark_command_being_percent_encoded.patch (684 bytes, patch)
2020-04-30 09:48 UTC, Yaroslav Sidlovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SimPS 2020-04-30 09:31:50 UTC
SUMMARY
When I try to add a bookmark with "%" -symbol and then want to use this bookmark in the terminal. "%" symbol appears like "%25"

STEPS TO REPRODUCE
1. add a bookmark with the "%" symbol
2. use this bookmark in terminal
3. 

OBSERVED RESULT


EXPECTED RESULT 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Yaroslav Sidlovsky 2020-04-30 09:40:52 UTC
How to reproduce this bug, in details:
1. Open konsole;
2. In the menu open: "Bookmarks" -> "Edit bookmarks...";
3. Add new bookmark with following properties:
Name: "Test date command"
Location: "date +%m-%d-%Y"

4. Close bookmark window;
5. Select new bookmark in the menu: "Bookmarks" -> "Test date command" (on the bottom);

You will see this output:
$ date +%25m-%25d-%25Y
0000000000000000000000004-0000000000000000000000030-0000000000000000000002020

Instead of this (correct behaviour):
$ date +%m-%d-%Y
04-30-2020

Notice that every '%' symbol got replaced with '%25'.
Comment 2 Yaroslav Sidlovsky 2020-04-30 09:42:52 UTC
Created attachment 128020 [details]
Visual representation of the bug
Comment 3 Yaroslav Sidlovsky 2020-04-30 09:47:08 UTC
Created attachment 128021 [details]
konsole_fix_bookmark_command_being_percent_encoded.patch
Comment 4 Yaroslav Sidlovsky 2020-04-30 09:48:42 UTC
Created attachment 128022 [details]
konsole_fix_bookmark_command_being_percent_encoded.patch

Sorry, wrong patch
Comment 5 Yaroslav Sidlovsky 2020-05-01 10:39:58 UTC
https://phabricator.kde.org/D29322
Comment 6 Kurt Hindenburg 2020-05-03 02:00:02 UTC
Git commit d3519ae24c0de218b3a2c0728fb4da519574044a by Kurt Hindenburg, on behalf of Yaroslav Sidlovsky.
Committed on 03/05/2020 at 01:59.
Pushed by hindenburg into branch 'master'.

Use Qurl::fromPercentEncoding for bookmarks

This will allow % in URLs; also sync test code with actual code.
Previously the tests were using toUtf8(); however fromPercentEncoding
seems better.
Differential Revision: https://phabricator.kde.org/D29322

M  +2    -1    src/SessionController.cpp
M  +4    -4    src/autotests/BookMarkTest.cpp

https://invent.kde.org/kde/konsole/commit/d3519ae24c0de218b3a2c0728fb4da519574044a
Comment 7 Kurt Hindenburg 2020-05-05 01:37:24 UTC
Git commit 35ff3a72cefea944000d166a7919291e74e03d9e by Kurt Hindenburg, on behalf of Yaroslav Sidlovsky.
Committed on 05/05/2020 at 00:52.
Pushed by hindenburg into branch 'release/20.04'.

Use Qurl::fromPercentEncoding for bookmarks

This will allow % in URLs; also sync test code with actual code.
Previously the tests were using toUtf8(); however fromPercentEncoding
seems better.
Differential Revision: https://phabricator.kde.org/D29322

(cherry picked from commit d3519ae24c0de218b3a2c0728fb4da519574044a)

M  +2    -1    src/SessionController.cpp
M  +4    -4    src/autotests/BookMarkTest.cpp

https://invent.kde.org/kde/konsole/commit/35ff3a72cefea944000d166a7919291e74e03d9e