Version: 3.4.91 (using KDE KDE 3.4.90) Installed from: Unlisted Binary Package A great feature of Konqueror is to select a non-linked (without html anchor tag) URL on a website, right-click and choose "Open 'http://.....'". Unfortunately this fails on wrapped lines, where there are line breaks (and spaces) in between the link. It is related to a bug that is marked as FIXED (http://bugs.kde.org/show_bug.cgi?id=82325), but at least is reproducable with Konqueror 3.4.91 (again?). I suggest removing any leading and trailing, _plus_ whitespace around line breaks that are in the selection.
This is with Kubuntu's KDE 3.5beta 1.
Confirmed on r620k. Patch and testcase to be attached.
Created attachment 19151 [details] testcase
Created attachment 19152 [details] patch to fix Patch to be applied in kdelibs/khtml
There are more testcases in Bug 134190 (dupe). It would be great, if the patch would get tested against those testcases as well and then committed for 3.5.7!
I would recommend + url.replace(QRegExp("[\\s]*\\n+[\\s]*"),""); instead of + url.replace(QRegExp("[\\ ]*\\n+[\\ ]*"),""); notice that the space is replaced by a s. (\s represents whitespace of all types in regular expressions). Otherwise I'm not sure why you need the backslashes in the square-bracketed expressions. Also please try to follow the style of the rest of the code. The url=m_part->... line should have spaces around the equal sign for instance. Other than that I think it's fine.
It should be applied even on Konqueror 4.
SVN commit 826895 by dfaure: Fix handling of selected text in context menu actions: * "search in <search provider>" should ignore leading/trailing whitespace, as well as the special char * "open <url>" (when the selected text looks like a URL) should also ignore linefeeds, i.e. treat the selection as a single line. BUG: 113177 M +36 -21 khtml_ext.cpp M +3 -1 khtml_ext.h M +15 -4 khtml_part.cpp M +12 -3 khtml_part.h WebSVN link: http://websvn.kde.org/?view=rev&revision=826895
Created attachment 27615 [details] patch A very useful future is to offer "Open url" even for selected text starting with "www.". Patch attached .