Review Mozilla 1902237: Enable untrimOnUserInteraction and trimHttps with ScotchBonnet
🔍 Bugzilla Audit
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1902237
Description
In the 14.5 release URLs displayed in the url bar that started with http://
had this part trimmed away for display purposes. This does not happen for https://
schemes. This was controlled by the browser.urlbar.trimHttps
preference, which is false
.
With the upstream change, the browser.urlbar.trimHttps
preference is ignored and overridden by browser.urlbar.scotchBonnet.enableOverride
, which is true
. As a result, https://
is trimmed, and http://
is not.
The major effect for us is .onion
sites, which tend to be http://
. As such, we should make an exception for .onion
. Either:
- Never trim the scheme for
.onion
addresses. - Only trim
http://
for.onion
addresses.
NOTE: I think the idea from upstream is that we should only trim the scheme that is assumed. I.e. if the user only types the address without a scheme, will they be taken to the http://
or the https://
site by default? For plain HTTP(S), it is the latter. I'm not sure for .onion
, but it seems to be http://
when testing with pierov's onion site.
NOTE: Search for "trimHttps" for the relevant code.