-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116073/#review50899
-----------------------------------------------------------


Hmm, KUrl isn't very good with relative urls indeed.

This fix is incomplete: a symlink to a path with a "%" in it would still lead 
to %25.

The Qt5 fix is obvious: toString(QUrl::FullyDecoded).

But in kdelibs4/qt4, I can't find a good solution. path() truncates at a '#', 
so no go either. Ah, I found it... QUrl(kurl).toString()  :-)
The method I always declared "completely wrong" (for not encoding '#' in paths, 
breaking round-tripping) finally has its usefulness... (for the case of 
relative urls, rather rare in KDE code).

I just committed a unittest extension to kurltest.cpp in KDE/4.12 which proves 
all this :)

- David Faure


On Feb. 26, 2014, 6:31 a.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116073/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2014, 6:31 a.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Bugs: 330463
>     http://bugs.kde.org/show_bug.cgi?id=330463
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> When creating symlinks in KNewFileMenuPrivate::_k_slotSymLink, call 
> prettyUrl() instead url() to retrieve the user entered text. Otherwise, a 
> percent encoded version of the URL will be used to create the symlink which 
> of course results in the creation of an invalid symlink. Note that this call 
> needs to probably be changed toString() in kf5 since it is using QUrl.
> 
> 
> Diffs
> -----
> 
>   kfile/knewfilemenu.cpp e7fe237 
> 
> Diff: https://git.reviewboard.kde.org/r/116073/diff/
> 
> 
> Testing
> -------
> 
> Follow the steps outlined in the bug report to create a symlink to a file 
> whose path or name contains characters that are not allowed in a URL.
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

Reply via email to