GNOME Bugzilla – Bug 551857
Handle properly external protocols like apt:// or magnet://
Last modified: 2012-02-07 13:11:26 UTC
go on http://www.jokosher.org/download there is a link apt://jokosher (Jokosher 0.10 for Ubuntu 8.10 (Intrepid Ibex)); clik on it and it produce a window without text;
Created attachment 118535 [details] jokosher this is a action window without label
That's something custom to ubuntu for sure, I'm using gnome-2-24 from svn and I just get 'apt is not a registered protocol'.
it happens also with xmpp: link, xmpp:eric@extremeboredom.net?message on http://eric.extremeboredom.net/about per instance
*** Bug 551959 has been marked as a duplicate of this bug. ***
The original report was probably filed against the old gecko version, but this is still true for the new webkit build. Say i run "xdg-open spotify:somesonghash" and it opens the song-URL up in spotify, then it should open it in spotify when i run the url in Epiphany but it doesn't. (The url handler was added to gconf manually fwiw).
Well I guess we could pass unknown schemes to gtk_show_uri. I wonder if it's safe though. Right now irc: searches google although it's registered for pidgin, for example.
(In reply to comment #6) > Well I guess we could pass unknown schemes to gtk_show_uri. That's probably not such a bad idea, if only for the ftp:// protocol that we still don't support in Webkit...
Created attachment 151902 [details] [review] Don't handle mailto as a web scheme mailto: is not precisely a web scheme, it was being handled as one by ephy_embed_utils_address_has_web_scheme(). Bug #551857
Created attachment 151903 [details] [review] Use gtk_show_uri to handle unknown uri schemas In policy_decision_required_cb() we were only considering mailto: as a case that should be handled by gtk_show_uri, we now let every non web scheme to be handled by gtk_show_uri. This enables xmpp:, apt: and similar links to work. Also use a proper GdkScreen for gtk_show_uri(). Bug #551857
Created attachment 151904 [details] [review] Don't use SoupURI in normalize_or_autosearch_url Change the logic to check if the url has no web scheme nor an unknown scheme. Previously we were autoserching when the url had no scheme or an unknown scheme. Bug #551857
Created attachment 151905 [details] [review] Handle non web schemas in ephy-web-view Centralize our handling of non web schemas. Bug #551857
The attached patches implement passing unknown web schemes to gtk_show_uri, one problem I haven't got around though is that typying "javascript:alert(1)" (for example) and hitting control+enter gives you a blank tab with a permanent 'loading status' and blank location entry. This both UI quirks should be fixable with a single thing I guess... like a false load_finished or something. Ideas?
*** Bug 668458 has been marked as a duplicate of this bug. ***
Review of attachment 151902 [details] [review]: This one seems sensible.
Review of attachment 151903 [details] [review]: This seems like the obvious fix, yes. One question, that we can fix in a follow-up: Chrome warns you about the fact that it is about to launch an external program to do some random thing, in case you were not aware of it. I think we should do the same if the reason in the policy cb is not LINK_CLICKED. Otherwise ephy could end up randomly opening programs by itself.
Created attachment 205898 [details] [review] ephy-embed-utils: mailto is not a web scheme
Created attachment 205899 [details] [review] ephy-window: pass non-web schemas to gtk_show_uri Handle every non-web scheme in policy_decision_required_cb with gtk_show_uri. This enables xmpp:, apt: and similar links to work.
Created attachment 205900 [details] [review] ephy-web-view: only autosearch input without scheme Create an autosearch from the user input only when it has no scheme at all.
Ok. This new set is just a rebase and update of commit message. The third one had a major facelift regarding explaining what the hell it does. It enables non-web schemas for urls that are loaded into the EphyWebView by means other than policy-requests (usual navigation). So for example the location bar can now take mailto:, mms://, etc. If you were to load something with EphyWebView API, it should work too. On the light of this, the 4th old patch is not needed, it's just a cleanup and refactoring to have a unique place to handle this situations.
Review of attachment 205898 [details] [review]: Yes, again :p
Review of attachment 205899 [details] [review]: Yes.
Comment on attachment 151905 [details] [review] Handle non web schemas in ephy-web-view not that much of an improvement. marking obsolete.
Review of attachment 205900 [details] [review]: This looks good too.
Done. Thanks! Attachment 205898 [details] pushed as 0e7ecc4 - ephy-embed-utils: mailto is not a web scheme Attachment 205899 [details] pushed as 607017e - ephy-window: pass non-web schemas to gtk_show_uri Attachment 205900 [details] pushed as 205a292 - ephy-web-view: only autosearch input without scheme
*** Bug 669568 has been marked as a duplicate of this bug. ***