Bug 366192 - Fixed http/https regex checks. draft
authorMoritz Brunner <moritzbrunner@freenet.de>
Thu, 02 Nov 2017 22:43:19 +0100
changeset 692283 367b16d05ac6966f616bb0ac2e096622e4c9ab38
parent 687781 9af785de987dc546c9e792c593cacd7b9b68e8bc
child 710747 e43a37d24b1cfde1a24a4545645769b3fc6ee9ce
child 710748 9416aadc4a26abef10e485639616129085baa97f
child 710749 314e4adc097099fe1080145d60f9af97913a5045
push id87470
push userbmo:moritzbrunner@freenet.de
push dateThu, 02 Nov 2017 22:52:10 +0000
bugs366192
milestone58.0a1
Bug 366192 - Fixed http/https regex checks. MozReview-Commit-ID: FL0AWkM9Ggm
toolkit/mozapps/handling/content/dialog.js
--- 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");
         }