Bug 325482

Summary: Symlink creation is broken: characters inappropriately escaped as if it were a web address.
Product: [Applications] kfile Reporter: kdebugs
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: frank78ac, kde, nate
Priority: NOR    
Version: 4.10.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot of example used in comment 2
screencast of the issue

Description kdebugs 2013-10-01 03:29:45 UTC
The "Create Symlink" dialog ("Create New" -> "Basic link to file or directory...") produces broken symlinks because it inappropriately escapes "special" characters with URL escape code sequences.
Affected characters include (but are not necessarily limited to): space, brackets, braces, angle brackets, backslash, pipe, percent, caret, grave accent.

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin.  Right-click in some folder and make a new file, then give it some content, or just rename any existing file to contain a space in the name.  In this example, the file will be named "hello world".
2. Right-click in the same folder and choose "Create New"->"Basic link to file or directory...".  The "Create Symlink" window will pop up.  Now enter "hello" for the "File name" and enter "hello world" for "Enter path of file or directory".  Click OK.
3. Try to use the symlink - it doesn't work.  Look at its properties: says it "Points to: hello%20world".  Replace the "%20" with a space and click OK.  The symlink now works.
Comment 1 Frank Reininghaus 2013-10-01 08:27:11 UTC
Thanks for the bug report.

The stuff from the "Create New..." menu is provided by KNewFileMenu from kdelibs/kfile -> I'll reassign.
Comment 2 Kai Uwe Broulik 2013-10-02 08:48:06 UTC
I cannot reproduce the issue here on 4.11.1.
I created a file named "Üture e09frejß0 234 % 234" and created a symlink using New → Basic link to file or directory.
It works as expected.
Comment 3 kdebugs 2014-04-08 23:37:35 UTC
Created attachment 86007 [details]
screenshot of example used in comment 2

The key to reproducing it is using a relative symlink instead of an absolute one.  Here's what it looks like on Kubuntu 13.10.  (KDE 4.11.5)  I also just had this problem on Manjaro 0.8.9 (KDE 4.12.2).
Comment 4 kdebugs 2014-04-08 23:42:12 UTC
Created attachment 86008 [details]
screencast of the issue

Any relative symlink containing spaces or strange characters will work.
Comment 5 Nate Graham 2018-04-10 21:55:10 UTC
This is fixed for me in KDE Frameworks 5.45.