Version: 1.1.2 (using KDE KDE 3.4.2) Installed from: Unlisted Binary Package OS: Linux Go to kde-look and open an article, right click on the Screenshot Thumbnail so it opens in a new tab, now usually (akregator in kde-3.4.1) clicking on the Full size Screenshot or the "close" option closes the window but now I get this Error: Could not start process Unable to create io-slave: klauncher said: Unknown protocol 'javascript'.
This appears to be a dup from 103076
No, this is about javascript: links, the other about popups not working. The links that open the popups don't use javascript, at least not on kde-apps. (And opening the link explicitely via "open in new tab" works there).
FYI, this problem is still here using kde-3.4.3 which has Akregator-1.1.3, so as a test I installed Akregator-1.0.1, and Clicking on the Screenhots or the [close] on the articles preview window it works fine, no Javascript error
I confirm it in akg. 1.2.1 under kde 3.5
I can confirm in 1.2.2 under KDE 3.5.2
to save a post, it's still not fixed until today, (post 1.2.4).
*** Bug 132287 has been marked as a duplicate of this bug. ***
Created attachment 17391 [details] Fix "javascript:" unknown protocol errors. How about something like this?
KDEfanboy: is it ok now????
Muhammad, try it and report if it works for you. I haven't run into "javascript: protocol error" problems since patching. Because it's code straight out of the KHTMLPart source[1] for the base implementation of urlSelectedIntern (which does the protocol check and executes the script), I imagine it should work in all execution cases. Though, as Frank pointed out in IRC, javascript calls that request opening urls and new windows won't open anything because all the BrowserExtension signals haven't been slotted yet. Assuming this patch works for you, at least other useful script functions can be used for now. A few quick example to test: if the screenshot previews close when you click them from articles in http://www.kde.org/kde-look-content.rdf http://www.kde.org/dot/kde-apps-content.rdf If you can "digg" articles (need an account) from arcticles in http://digg.com/rss/containertechnology.xml And test any other feeds you have that you can click through to pages which call 'javascript:' urls upon clicking. [1] http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/khtml/html/khtml__part_8cpp-source.html
so it is ok in ur thinking. hay buddy i m not much old in linux world. a few months ago i m here. so guide me how to apply the changes in akregator. i am using it in gnome ;). ur provided likns are full of codes. i do not know where it to be applied.
Muhammad, in that case, good luck. :P Follow these instructions, and if you have problems, just email me: http://rafb.net/paste/results/Zax6c134.nln.html
Don't do that, it could break your KDE-PIM installation if you do not know what you are doing and how to set up KDEDIRS and PATH right. Better wait for 3.5.5 where this should be fixed.
and when it is going to be realesed???
Looks like the problem persists in KDE 3.5.5. According to "About Akregator", I'm using Akregator 1.2.5 (Using KDE 3.5.5). This is the result when I click the digg link (the motivation for me to upgrade to KDE 3.5.5) An error occurred while loading javascript:wrapper_full(1,5,570373,'e934e775800f59bae5b3aff49c5c5dc6'): Could not start process Unable to create io-slave: klauncher said: Unknown protocol 'javascript'.
Someone should check whether the problem persists with the "Enable javascript to allow bookmarklets" KIOSlave installed.
The patch was never applied, because it fixed the problem only partially. I wanted to get it "right", but then whole issue lost focus and got forgotten. Sorry, you'll have to wait for 3.5.6.
Is this fixed in 3.5.6? I didn't see it mentioned in the change log. Akregator would be close to perfect to me if this is fixed.
Almost :) Clicking on the Thumbnail now brings up the full size pic, if there is more than 1 pic in the preview choosing them works. Clicking on the Pic or the "close" option pops up this error: An error occurred while loading javascript:self.close(): Could not start process Unable to create io-slave: klauncher said: Unknown protocol 'javascript'. So I use the back button for now. FC6 kde-redhat.3.5.6-3 (Testing)
kde-look changed their fullsize popup url to use href with target instead of javascript:..., which is still not handled in akregator. I wonder what's holding this back...
> I wonder what's holding this back... The broken browser implementation in the 3.5 branch.
*** Bug 141882 has been marked as a duplicate of this bug. ***
SVN commit 637065 by osterfeld: partially fix "javascript:" links in the browser tabs patch by KDEfanboy CCBUG: 110308 M +12 -5 pageviewer.cpp --- branches/KDE/3.5/kdepim/akregator/src/pageviewer.cpp #637064:637065 @@ -356,15 +356,22 @@ void PageViewer::urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args) { - if (button == LeftButton) + if (url.startsWith(QString::fromLatin1( "javascript:" ), /*case-sensitive=*/false) ) { - m_url = completeURL(url); - browserExtension()->setURLArgs(args); - slotOpenLinkInThisTab(); + KHTMLPart::urlSelected(url,button,state,_target,args); } else { - Viewer::urlSelected(url,button,state,_target,args); + if (button == LeftButton) + { + m_url = completeURL(url); + browserExtension()->setURLArgs(args); + slotOpenLinkInThisTab(); + } + else + { + Viewer::urlSelected(url,button,state,_target,args); + } } }
SVN commit 637252 by winterz: merge SVN commit 637065 by osterfeld: partially fix "javascript:" links in the browser tabs patch by KDEfanboy CCBUG: 110308 M +12 -5 branches/work/kdepim-3.5.5+/akregator/src/pageviewer.cpp --- branches/work/kdepim-3.5.5+/akregator/src/pageviewer.cpp #637251:637252 @@ -356,15 +356,22 @@ void PageViewer::urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args) { - if (button == LeftButton) + if (url.startsWith(QString::fromLatin1( "javascript:" ), /*case-sensitive=*/false) ) { - m_url = completeURL(url); - browserExtension()->setURLArgs(args); - slotOpenLinkInThisTab(); + KHTMLPart::urlSelected(url,button,state,_target,args); } else { - Viewer::urlSelected(url,button,state,_target,args); + if (button == LeftButton) + { + m_url = completeURL(url); + browserExtension()->setURLArgs(args); + slotOpenLinkInThisTab(); + } + else + { + Viewer::urlSelected(url,button,state,_target,args); + } } }
I can confirm akregator 1.2.6 using KDE 3.5.6 works with this patch. Thank you.
Fixed in trunk