Bug 366192 - Fixed http/https regex checks.
MozReview-Commit-ID: FL0AWkM9Ggm
--- a/toolkit/mozapps/handling/content/dialog.js
+++ b/toolkit/mozapps/handling/content/dialog.js
@@ -116,17 +116,17 @@ var dialog = {
elm.obj = app;
if (app instanceof Ci.nsILocalHandlerApp) {
// See if we have an nsILocalHandlerApp and set the icon
let uri = ios.newFileURI(app.executable);
elm.setAttribute("image", "moz-icon://" + uri.spec + "?size=32");
} else if (app instanceof Ci.nsIWebHandlerApp) {
let uri = ios.newURI(app.uriTemplate);
- if (/^https?/.test(uri.scheme)) {
+ if (/^https?$/.test(uri.scheme)) {
// Unfortunately we can't use the favicon service to get the favicon,
// because the service looks for a record with the exact URL we give
// it, and users won't have such records for URLs they don't visit,
// and users won't visit the handler's URL template, they'll only
// visit URLs derived from that template (i.e. with %s in the template
// replaced by the URL of the content being handled).
elm.setAttribute("image", uri.prePath + "/favicon.ico");
}