Get correct url to open for script src=

git-svn-id: svn://10.0.0.236/trunk@6068 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-07-21 16:43:48 +00:00
parent 0667f6d4e3
commit ef426ce17e
2 changed files with 14 additions and 6 deletions

View File

@@ -1554,9 +1554,13 @@ nsresult HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode)
if (nsnull != src) {
// Use the SRC attribute value to open a blocking stream
nsIURL* url = nsnull;
char* spec = src->ToNewCString();
rv = NS_NewURL(&url, nsnull, spec);
delete spec;
nsAutoString absURL, baseURL;/* XXX */
nsIURL* docURL = mDocument->GetDocumentURL();
rv = NS_MakeAbsoluteURL(docURL, baseURL, *src, absURL);
if (NS_OK != rv) {
return rv;
}
rv = NS_NewURL(&url, nsnull, absURL);
delete src;
if (NS_OK != rv) {
return rv;