Bug 401555

Summary: Allow Escaping Ampersand in Bookmarks
Product: [Applications] krusader Reporter: niko+kde_org
Component: shortcutsAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: krusader-bugs-null
Priority: NOR    
Version First Reported In: 2.7.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description niko+kde_org 2018-11-30 01:43:23 UTC
I want a bookmark to read "D&D". However, the & is used to assign a mnemonic key (accelerator?) to a bookmark. I tried "D_&D" and "D\&D". I suggest latter as a method to escape special characters.

STEPS TO REPRODUCE
1. Create new Bookmark
2. Use an ampersand in the name

OBSERVED RESULT
3. The ampersand does not appear in the name, as intended

EXPECTED RESULT
2. Use an escaped ampersand in the name
3. The ampersand does appear in the name and is not active as a mnemonic key

SOFTWARE/OS VERSIONS
 KDE Plasma Version: 5.14.4
 KDE Frameworks Version: 5.52.0
 Qt Version: 5.11.2
Comment 1 Christoph Feck 2018-12-20 15:56:23 UTC
Does D&&D work?
Comment 2 niko+kde_org 2018-12-20 16:16:53 UTC
(In reply to Christoph Feck from comment #1)
> Does D&&D work?

"B&&ookmark" results in "B&ookmark" but only B works as a mnemonik, neither o nor &.
Comment 3 Christoph Feck 2018-12-20 18:14:08 UTC
Then try B&&&ook :)

&& is an escaped &, the third & marks the accelerator for 'o'.
Comment 4 niko+kde_org 2018-12-20 18:23:21 UTC
(In reply to Christoph Feck from comment #3)
> Then try B&&&ook :)
> 
> && is an escaped &, the third & marks the accelerator for 'o'.
Now I got it, thank you very much.

There's still an issue that the Name in the "Configure Toolbars" menu does not match the name that will be displayed.

Bookmark Editor: D&&D
Configure Toolbar: DD
Toolbar: D&D

But that's trivial once you tried it.