Fix relative url handling in page info. Bug 153545, patch by

db48x@yahoo.com (Daniel Brooks), r=jag, sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2002-11-13 04:28:24 +00:00
Родитель f746bfceb2
Коммит 615b15abeb
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -990,7 +990,8 @@ function formatDate(datestr, unknown)
*
* for node==null or url=="", empty string is returned
*
* This is basically just copied from http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/metadata.js
* This is basically just copied from http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/metadata.js,
* though I've modified it so that it doesn't assign to .spec
*/
function getAbsoluteURL(url, node)
@ -1026,7 +1027,14 @@ function getAbsoluteURL(url, node)
for (var i=0; i<urlArr.length; i++)
{
URL.spec = URL.resolve(urlArr[i]);
try
{
URL = ioService.newURI(urlArr[i], URL.originCharset, URL);
}
catch (ex)
{
; // do nothing
}
}
return URL.spec;