diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js index c7b67c423c08..d216346c2930 100644 --- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -1117,8 +1117,9 @@ var imagePermissionObserver = { var row = getSelectedRow(imageTree); var item = gImageView.data[row][COL_IMAGE_NODE]; var url = gImageView.data[row][COL_IMAGE_ADDRESS]; - if (makeURI(url).host == permission.host) + if (permission.matchesURI(makeURI(url), true)) { makeBlockImage(url); + } } } } diff --git a/browser/base/content/pageinfo/permissions.js b/browser/base/content/pageinfo/permissions.js index a67ecd07b660..eaf5824151d4 100644 --- a/browser/base/content/pageinfo/permissions.js +++ b/browser/base/content/pageinfo/permissions.js @@ -18,7 +18,7 @@ var permissionObserver = { { if (aTopic == "perm-changed") { var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission); - if (permission.host == gPermURI.host) { + if (permission.matchesURI(gPermURI, true)) { if (gPermissions.indexOf(permission.type) > -1) initRow(permission.type); else if (permission.type.startsWith("plugin")) @@ -35,7 +35,7 @@ function onLoadPermission() if (SitePermissions.isSupportedURI(uri)) { gPermURI = uri; var hostText = document.getElementById("hostText"); - hostText.value = gPermURI.host; + hostText.value = gPermURI.prePath; for (var i of gPermissions) initRow(i);