GNOME Bugzilla – Bug 789776
Allow disabling autosearch
Last modified: 2018-04-26 17:54:38 UTC
A URL entered as example/something ends up having the forward slash incorrectly escaped to %2F and treated as part of the domain, resulting in a canonicalisation of: http://example%2Fsomething/ This should instead be canonicalised to: http://example/something In contrast Firefox for example correctly canonicalises the URL. This happens for any number of forward slashes in the entered string (example/something/another becomes http://example%2Fsomething%2Fanother, etc.) This doesn't happen when there is a dot in the domain (e.g. example.com/something), or when the scheme is explicitly entered (e.g. http://example/something).
I'm trying to understand... You say there's no problem if you enter "http://example/something". So the problem is only if you enter "example/something" and nothing else? But that triggers a web search using the default search engine, not a URI load.
Ah, you're right. Because there's no option to entirely disable Web's heuristic-based "default search" searching (i.e. guessing if the entered text is an address or a search, as opposed to explicit bang-based searching), I have added a default search engine with a URL of "%s" (via dconf since prefs doesn't like it ;)). One of the reasons I did this is, Web's heuristic interprets domains without dots (commonly used in intranets, e.g. "internal-server") as searches. So trying to navigate to: internal-server/url-with-sensitive-info Results in Web instead trying to search for the entire string. Which of course means that using my bare "%s" hack results in the string (i.e. the slash) being escaped. I will open a new bug for "option for no default search".
Hmmmm, there's an existing bug (somewhere) to improve the heuristic. Let's use this bug to add an option to turn off the search.
I was thinking of repurposing this bug initially too :) In terms of UI, the simplest change would be to not make the "Default" switch for a search engine insensitive when switched to "On", so that if the user switches it off for all engines, that would be interpreted behind the scenes as "disable heuristic, always try to resolve domain". Pro: very minor UI change. Con: makes "disable auto-search" very non-obvious (even its existence). The alternative I guess would be a drop-down for default search, with a "never try to search" option.
(In reply to Michael Catanzaro from comment #3) > Hmmmm, there's an existing bug (somewhere) to improve the heuristic. Let's > use this bug to add an option to turn off the search. That's bug #757248.
(In reply to Stephen from comment #4) > Pro: very minor UI change. > Con: makes "disable auto-search" very non-obvious (even its existence). > > The alternative I guess would be a drop-down for default search, with a > "never try to search" option. Both plausible ideas. The whole dialog needs a redesign, really. I'm just happy to have a functioning search engine dialog at all. But anyway, I'm not going to spend time messing with the dialog. You're welcome to contribute a patch if you like; otherwise, you'll have to live with a hidden setting. You can toggle it like this: $ gsettings set org.gnome.Epiphany.web:/org/gnome/epiphany/web/ enable-autosearch false Let me know what you think.
Created attachment 362770 [details] [review] Add setting to disable autosearch On some intranets, it's important to be able to load domains with no dot, e.g. example/something. But currently this triggers a web search if the protocol is not explicitly specified, e.g. http://example.something. Some users would rather disable autosearch rather than have to type out http:// all the time, so add a hidden setting to cater to them.
Well I messed up the commit message, let's try again.
Created attachment 362771 [details] [review] Add setting to disable autosearch On some intranets, it's important to be able to load domains with no dot, e.g. example/something. But currently this triggers a web search if the protocol is not explicitly specified, e.g. http://example/something. Some users would rather disable autosearch rather than have to type out http:// all the time, so add a hidden setting to cater to them.
Fantastic, thanks! Presumably when enabled this will just make the "default search" setting unused. I guess the "web" dconf subdirectory is for config specific to the main Web application (vs. configuration applicable/specific to web-applications)?
(In reply to Stephen from comment #10) > Fantastic, thanks! Presumably when enabled this will just make the "default > search" setting unused. Yes. > I guess the "web" dconf subdirectory is for config specific to the main Web > application (vs. configuration applicable/specific to web-applications)? Not really... it's for settings that are not shared with web applications. Each web application has its own separate copy of all of these settings. Whereas most settings are shared. I guess it maybe doesn't need to be there, since you can't search in a web application anyway, but it's where the other search engine settings are, so I'll leave it there.
Attachment 362771 [details] pushed as 7e96228 - Add setting to disable autosearch