Closed Bug 93513 Opened 23 years ago Closed 23 years ago

Javascript's window.open does not honor <BASE> tag

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.8

People

(Reporter: vader21, Assigned: jst)

References

()

Details

(Whiteboard: [HAVE FIX])

Attachments

(1 file)

The window.open() method does not use the base url for the containing document
when opening relative links.  Of note is that Netscape 4 exhibits the correct
behavior while Internet Explorer 5.5 and Opera 5 exhibit the same (I believe
incorrect) behavior that Mozilla currently does.
Browser, not engine --> DOM Level 0
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
Confirming behavior with Mozilla binaries 20010731xx on WinNT, Linux, Mac.

Steps to reproduce:

1. Open the URL http://www.imsa.edu/~vader21/basetest/
2. Click on the "subdir" link
3. This will open a child window
4. The URL of this child window in NN4.7 is
   http://www.imsa.edu/~vader21/basetest/next.html
5. The URL of this child window in Mozilla is this instead:
   http://www.imsa.edu/~vader21/basetest/subdir/next.html
Status: UNCONFIRMED → NEW
Ever confirmed: true
Here is the HTML for the parent URL:

<html>
<head>
<title>Index of /~vader21/basetest</title>
</head>

<body>
<h1>Index of /~vader21/basetest</h1>
<pre><img SRC="/icons/blank.gif" ALT="     ">

<a HREF="?N=D">Name</a>
<a HREF="?M=A">Last modified</a>
<a HREF="?S=A">Size</a>
<a HREF="?D=A">Description</a>

<hr>

<img SRC="/icons/back.gif" ALT="[DIR]"> 
<a HREF="/~vader21/">
Parent Directory</a> 03-Aug-2001 15:10      -  

<img SRC="/icons/text.gif" ALT="[TXT]">
<a HREF="next.html">next.html</a> 03-Aug-2001 15:10     1k  
<img SRC="/icons/folder.gif" ALT="[DIR]"> 

<a HREF="subdir/">subdir/</a> 03-Aug-2001 15:28      -  

</pre><hr>
</body>
</html>
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.8
Attached patch Proposed fix.Splinter Review
Dan, could you review this nsWindowWatcher patch?
Hardware: PC → All
Whiteboard: [HAVE FIX]
Comment on attachment 59685 [details] [diff] [review]
Proposed fix.

r=danm
Attachment #59685 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: