Bug 254102

Summary: When dropping a link to rekonq's pageview, some characters are changed resulting in wrong url.
Product: rekonq Reporter: eric <prozac>
Component: generalAssignee: Andrea Diamantini <adjam7>
Status: RESOLVED FIXED    
Severity: normal CC: fxrh, prozac
Priority: NOR    
Version: 0.6.0   
Target Milestone: ---   
Platform: Archlinux Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description eric 2010-10-14 01:25:39 UTC
Version:           0.6.0 (using KDE 4.5.2) 
OS:                Linux

When doing a drag & drop of a link from some window to rekonq, the '?' character in the link address is changed in to "%3F". Because of this rekonq will give me a "404 Not Found".

Reproducible: Always

Steps to Reproduce:
(1) Find an e-mail or webpage with a link that has the '?' character inside the link (for example: http://forum.kde.org/viewtopic.php?f=116&t=89199&p=173104&e=173104);
(2) Drag and drop this link from the window of this e-mail client or browser in to rekonq's window.

Actual Results:  
Rekonq will fail to load the webpage, because the '?' character in the link address is changed in to "%3F".

Expected Results:  
Rekonq will load the correct webpage.

I've tried doing a drag & drop of this link from kontact/kmail, konqueror or firefox to rekonq and all resulted in the same error. Doing a drag & drop of the same link from the same applications to konqueror or firefox did not result in the same error.
Comment 1 Felix Rohrbach 2011-01-16 15:33:08 UTC
Maybe interesting observation:
Dropping the link from a rekonq window works, but not from firefox. The drop indicator is different in these two cases, too.
Comment 2 eric 2011-03-25 19:10:55 UTC
I'm using version 0.6.89 now and this problem still exists.

Try to drag the next link from a different browser to rekonq:
https://bugs.archlinux.org/task/22791#comment73898
On my system the '#' character is changed to "%23" and the action will result in "object not found".

So, not only the '?' but also the '#' and maybe other characters too are changed in a drag and drop action resulting in not finding the page (object not found) or even worse going to a different page.
Comment 3 Andrea Diamantini 2011-03-26 13:57:39 UTC
I did exactly what you said. And it works for me: opened firefox 4 with in the URL signed (https://bugs.archlinux.org/task/22791#comment73898), opened rekonq and cleaned up its urlbar, then went back to firefox, selected url, drag & drop to rekonq urlbar. It definitely works for me.
Comment 4 eric 2011-03-26 17:03:58 UTC
I've never dropped a link in the urlbar because it's so small :-) and sometimes covered by other windows.
I've just tested dropping in the urlbar, and you're right: this works.

But what I've meant was (and also what I normally do), is dropping the link in the place where the content of the page is shown (where you are reading this text)... and when doing this some characters are changed resulting rekonq going to a different (or non-existing) page.
Comment 5 eric 2011-03-26 23:00:34 UTC
After my last comment (#4) I forgot to reopen the bug.

My reason to reopen the bug is to make you aware that this bug is about dropping a link in the pageview (not the urlbar)... sorry I wasn't clear about this in the bug description.

Of course, dropping a link in the urlbar is a usable workaround, so you can close it again if you think it is appropriate to do so.
Comment 6 Andrea Diamantini 2011-03-30 00:37:54 UTC
Git commit 8681257ee91ac1bde53ff3a65cea2f2c2fd12792 by Andrea Diamantini.
Committed on 30/03/2011 at 00:44.
Pushed by adjam into branch 'master'.

Implement/fix drag and drop handling of text & url in the webview

BUG:254102

M  +33   -0    src/webview.cpp     
M  +2    -0    src/webview.h     

http://commits.kde.org/rekonq/8681257ee91ac1bde53ff3a65cea2f2c2fd12792