mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
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:
parent
c36374e9d9
commit
b49531798e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user