192755 - unable to allow popup from site with specified port. r=bzbarsky, sr=jag

git-svn-id: svn://10.0.0.236/trunk@139064 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
shliang%netscape.com 2003-03-07 02:20:13 +00:00
parent 34464419c0
commit e472679a01
2 changed files with 6 additions and 2 deletions

View File

@ -350,7 +350,7 @@ function addPermission() {
var host = addSiteBox.value;
if (host != "") {
host = host.replace(/^\s*([-\w]*:\/*)?/, ""); // trim any leading space and scheme
host = host.replace(/^\s*([-\w]*:\/+)?/, ""); // trim any leading space and scheme
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
@ -368,6 +368,8 @@ function addPermission() {
return;
}
host = uri.hostPort;
if (!host) {
addSiteBox.value = "";
return;

View File

@ -350,7 +350,7 @@ function addPermission() {
var host = addSiteBox.value;
if (host != "") {
host = host.replace(/^\s*([-\w]*:\/*)?/, ""); // trim any leading space and scheme
host = host.replace(/^\s*([-\w]*:\/+)?/, ""); // trim any leading space and scheme
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
@ -368,6 +368,8 @@ function addPermission() {
return;
}
host = uri.hostPort;
if (!host) {
addSiteBox.value = "";
return;