Version: 4.5.2 (using KDE 4.5.2) OS: Linux The "Copy Link Address" item on the context menu for a hyperlink copies an unescaped URL to the clipboard. When subsequently pasted elsewhere (e.g., KMail composer, web forum post) the URL may not be auto-linked completely because it may contain illegal characters (such as spaces). Worse, if parts within the URL contain characters that have special meaning in the context of parsing a URL, the URL will take on different (unintended) semantics when re-parsed. For example, if the path part contains a question mark, decoding the URL and then re-encoding it will cause that question mark to be interpreted as a delimiter between the path part and the query string part rather than as internal to the path part. Reproducible: Didn't try Steps to Reproduce: Find a web page containing a hyperlink to a URL that contains special characters such as spaces. Right-click the hyperlink and choose "Copy Link Address". Paste into a text field widget in any application. Actual Results: The pasted URL contains unescaped special characters, which will confuse auto-linkers and may even change the meaning of the URL. Expected Results: The pasted URL should be properly escaped using percent-encoding, as specified by IETF RFC 3986 section 2.1. According to IETF RFC 3986 section 2.4: "Once produced, a URI is always in its percent-encoded form." So technically, it is also wrong for Konqueror to display the unencoded URL in the address bar.
Please provide a valid test case. Simply saying "find a web page containing a hyperlink to a URL..." will not work because it makes the report a hypothetical.
(In reply to comment #1) > Please provide a valid test case. Simply saying "find a web page containing a > hyperlink to a URL..." will not work because it makes the report a > hypothetical. Test case with step-by-step instructions: http://www.mattwhitlock.com/bug255070.html
Git commit bcc11e760500fac6f05d016bc23977de7a4d2bbe by Dawit Alemayehu. Committed on 10/06/2011 at 03:12. Pushed by adawit into branch '1.2'. - Use QWebPage's built-in actions to copy link url so that URL are properly encoded. - Make sure the URL we copy from a media element, which is not supported by a QWebPage action, is properly precent encoded. CCBUG: 255070 M +3 -14 src/kwebkitpart_ext.cpp http://commits.kde.org/kwebkitpart/bcc11e760500fac6f05d016bc23977de7a4d2bbe
Git commit 09f33d88cda4908ed6b11e31ce40bb9f8c58f99b by Dawit Alemayehu. Committed on 10/06/2011 at 03:12. Pushed by adawit into branch 'master'. - Use QWebPage's built-in actions to copy link url so that URL are properly encoded. - Make sure the URL we copy from a media element, which is not supported by a QWebPage action, is properly precent encoded. CCBUG: 255070 (cherry picked from commit bcc11e760500fac6f05d016bc23977de7a4d2bbe) M +3 -14 src/kwebkitpart_ext.cpp http://commits.kde.org/kwebkitpart/09f33d88cda4908ed6b11e31ce40bb9f8c58f99b
I have fixed the issue in kwebkitpart by using QtWebKit's built-in actions instead of doing the copying manually. The fix for khtml requires that KUrl, more specifically KUrl::populateMimeData gets fixed, so I am changing the title of this bug report and reassigning this to kdelibs.
(In reply to comment #5) > I have fixed the issue in kwebkitpart by using QtWebKit's built-in actions > instead of doing the copying manually. Excellent. I almost always use kwebkitpart. The only time I don't is when Konqueror disrespects my embedding services preference order.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
I stopped using Konqueror a long time ago because it wasn't keeping up with Chromium. I no longer keep it installed, so I have no stake in this bug report anymore. Feel free to close, as there are no other commenters reporting the same issue.
Thanks for the update!