diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index 4413d516bf..3851b86e81 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -3200,7 +3200,7 @@ function onRemoteContentOptionsShowing(aEvent) { if (adrCount > 0) { let authorEmailAddress = addresses.value[0]; let authorEmailAddressURI = Services.io.newURI( - "chrome://messenger/content/?email=" + authorEmailAddress); + "chrome://messenger/content/email=" + authorEmailAddress); let mailPrincipal = Services.scriptSecurityManager .createCodebasePrincipal(authorEmailAddressURI, {}); origins.push(mailPrincipal.origin); @@ -3223,11 +3223,11 @@ function onRemoteContentOptionsShowing(aEvent) { let menuitem = document.createElement("menuitem"); menuitem.setAttribute("label", messengerBundle.getFormattedString("remoteAllowResource", - [origin.replace("chrome://messenger/content/?email=", "")])); + [origin.replace("chrome://messenger/content/email=", "")])); menuitem.setAttribute("value", origin); menuitem.setAttribute("class", "allow-remote-uri"); menuitem.setAttribute("oncommand", "allowRemoteContentForURI(this.value);"); - if (origin.startsWith("chrome://messenger/content/?email=")) + if (origin.startsWith("chrome://messenger/content/email=")) aEvent.target.appendChild(menuitem); else aEvent.target.insertBefore(menuitem, urlSepar); @@ -3264,7 +3264,7 @@ function allowRemoteContentForURI(aUriSpec, aReload = true) { function allowRemoteContentForAll(aListNode) { let uriNodes = aListNode.querySelectorAll(".allow-remote-uri"); for (let uriNode of uriNodes) { - if (!uriNode.value.startsWith("chrome://messenger/content/?email=")) + if (!uriNode.value.startsWith("chrome://messenger/content/email=")) allowRemoteContentForURI(uriNode.value, false); } ReloadMessage(); diff --git a/mail/components/preferences/permissions.js b/mail/components/preferences/permissions.js index 5482ae3db6..404a904315 100644 --- a/mail/components/preferences/permissions.js +++ b/mail/components/preferences/permissions.js @@ -14,7 +14,7 @@ var NOTIFICATION_FLUSH_PERMISSIONS = "flush-pending-permissions"; * Magic URI base used so the permission manager can store * remote content permissions for a given email address. */ -var MAILURI_BASE = "chrome://messenger/content/?email="; +var MAILURI_BASE = "chrome://messenger/content/email="; function Permission(principal, type, capability) { diff --git a/mail/test/mozmill/content-policy/test-general-content-policy.js b/mail/test/mozmill/content-policy/test-general-content-policy.js index 80282d7a88..5e8f543fee 100644 --- a/mail/test/mozmill/content-policy/test-general-content-policy.js +++ b/mail/test/mozmill/content-policy/test-general-content-policy.js @@ -309,7 +309,7 @@ function checkAllowForSenderWithPerms(test) { MailServices.headerParser.parseHeadersWithArray(msgDbHdr.author, addresses, {}, {}); let authorEmailAddress = addresses.value[0]; - let uri = Services.io.newURI("chrome://messenger/content/?email=" + authorEmailAddress); + let uri = Services.io.newURI("chrome://messenger/content/email=" + authorEmailAddress); Services.perms.add(uri, "image", Services.perms.ALLOW_ACTION); assert_true(Services.perms.testPermission(uri, "image") == Services.perms.ALLOW_ACTION); diff --git a/mailnews/base/src/nsMsgContentPolicy.cpp b/mailnews/base/src/nsMsgContentPolicy.cpp index ddc5b38890..393471649b 100644 --- a/mailnews/base/src/nsMsgContentPolicy.cpp +++ b/mailnews/base/src/nsMsgContentPolicy.cpp @@ -111,7 +111,7 @@ nsMsgContentPolicy::ShouldAcceptRemoteContentForSender(nsIMsgDBHdr *aMsgHdr) nsCOMPtr ios = do_GetService("@mozilla.org/network/io-service;1", &rv); NS_ENSURE_SUCCESS(rv, false); nsCOMPtr mailURI; - emailAddress.Insert("chrome://messenger/content/?email=", 0); + emailAddress.Insert("chrome://messenger/content/email=", 0); rv = ios->NewURI(emailAddress, nullptr, nullptr, getter_AddRefs(mailURI)); NS_ENSURE_SUCCESS(rv, false); diff --git a/mailnews/base/test/unit/test_accountMigration.js b/mailnews/base/test/unit/test_accountMigration.js index f94515b097..defaed92f3 100644 --- a/mailnews/base/test/unit/test_accountMigration.js +++ b/mailnews/base/test/unit/test_accountMigration.js @@ -33,11 +33,11 @@ function run_test() { testAB.copyTo(do_get_profile(), kPABData.fileName); let uriAllowed = Services.io.newURI( - "chrome://messenger/content/?email=yes@test.invalid"); + "chrome://messenger/content/email=yes@test.invalid"); let uriAllowed2 = Services.io.newURI( - "chrome://messenger/content/?email=yes2@test.invalid"); + "chrome://messenger/content/email=yes2@test.invalid"); let uriDisallowed = Services.io.newURI( - "chrome://messenger/content/?email=no@test.invalid"); + "chrome://messenger/content/email=no@test.invalid"); // Check that this email that according to the ab data has (had!) // remote content premissions, has no premissions pre migration. diff --git a/mailnews/base/util/mailnewsMigrator.js b/mailnews/base/util/mailnewsMigrator.js index fbb6a4419d..56d9edfa76 100644 --- a/mailnews/base/util/mailnewsMigrator.js +++ b/mailnews/base/util/mailnewsMigrator.js @@ -132,7 +132,7 @@ function MigrateABRemoteContentSettings() { let migrateAddress = function(aEmail) { let uri = Services.io.newURI( - "chrome://messenger/content/?email=" + aEmail); + "chrome://messenger/content/email=" + aEmail); Services.perms.add(uri, "image", Services.perms.ALLOW_ACTION); } diff --git a/suite/mailnews/mailWindowOverlay.js b/suite/mailnews/mailWindowOverlay.js index 68f28db258..a7dbf353f6 100644 --- a/suite/mailnews/mailWindowOverlay.js +++ b/suite/mailnews/mailWindowOverlay.js @@ -2762,7 +2762,7 @@ function onRemoteContentOptionsShowing(aEvent) var authorEmailAddress = addresses.value[0]; var emailURI = Services.io.newURI( - "chrome://messenger/content/?email=" + authorEmailAddress); + "chrome://messenger/content/email=" + authorEmailAddress); var principal = Services.scriptSecurityManager .createCodebasePrincipal(emailURI, {}); // Put author email first in the menu. @@ -2780,7 +2780,7 @@ function onRemoteContentOptionsShowing(aEvent) for (let origin of origins) { let menuitem = document.createElement("menuitem"); - let host = origin.replace("chrome://messenger/content/?email=", ""); + let host = origin.replace("chrome://messenger/content/email=", ""); let hostString = messengerBundle.getFormattedString("remoteContentAllow", [host]); menuitem.setAttribute("label", hostString); menuitem.setAttribute("value", origin);