I can reproduce on trunk. What happens is that when escape is pressed, the textValue property of the binding in urlbarBindings.xml is set with the value currently in the urlbar. The setter there tries to parse the URI using nsIOService::newURI. If it succeeds, the nsIURI.spec attribute is used to fill the urlbar. The cause of the issue is that this process can add trailing slashes:
for each (let u in ["foo", "ftp", "ftp:", "ftp://", "http", "http:", "http:/", "http://", "http://foo", "http://foo/", "http://foo/bar"]) {
let spec = "<none>";
try {
spec = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService) .newURI(u, null, null).spec;
} catch(e) {}
dump("Url: " + u + " -> " + spec + "\n");
}
I can reproduce on trunk. What happens is that when escape is pressed, the textValue property of the binding in urlbarBindings.xml is set with the value currently in the urlbar. The setter there tries to parse the URI using nsIOService: :newURI. If it succeeds, the nsIURI.spec attribute is used to fill the urlbar. The cause of the issue is that this process can add trailing slashes:
for each (let u in ["foo", "ftp", "ftp:", "ftp://",
" http", "http:", "http:/", "http://", "http:// foo",
"http:// foo/", "http:// foo/bar"]) { org/network/ io-service; 1"]
.getService( Ci.nsIIOService )
.newURI( u, null, null).spec;
let spec = "<none>";
try {
spec = Cc["@mozilla.
} catch(e) {}
dump("Url: " + u + " -> " + spec + "\n");
}
Url: foo -> <none> / / / foo -> http:// foo/ foo/ -> http:// foo/ foo/bar -> http:// foo/bar
Url: ftp -> <none>
Url: ftp: -> ftp:///
Url: ftp:// -> ftp:///
Url: http -> <none>
Url: http: -> http://
Url: http:/ -> http://
Url: http:// -> http://
Url: http://
Url: http://
Url: http://