Closed Bug 106912 Opened 23 years ago Closed 16 years ago

Anchors with HREF="" are wrongly treated as link to current page (invalid)

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: stellan, Assigned: harishd)

References

Details

(Whiteboard: DUPEME)

Anchors with HREF="" are wrongly treated as link to current page

Assume we have a page "xxx/yyy.html" containing anchor <a href="">.

That anchor really should link to "xxx/". Mozilla links to "xxx/yyy.html"

IE, Netscape 4 and 6 all links to "xxx/" as the RFC 1808 suggests.


-------------------------------------------------------
RFC 1808 Relative Uniform Resource Locators  June 1995

5.2.  Abnormal Examples

   Although the following abnormal examples are unlikely to occur in
   normal practice, all URL parsers should be capable of resolving them
   consistently.  Each example uses the same base as above.

   An empty reference resolves to the complete base URL:

      <> = <URL:http://a/b/c/d;p?q#f>
.
Assignee: asa → harishd
Component: Browser-General → Parser
QA Contact: doronr → moied
Whiteboard: DUPEME
Bug is self-contradictory. Based on the text quoted below, our behavior is
correct (i.e., href="" links to the full base URL, which in the document at
"http://www.example.com/xxx/yyy.html" is "http://www.example.com/xxx/yyy.html").
Resolving INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Verified invalid
Status: RESOLVED → VERIFIED
*** Bug 136740 has been marked as a duplicate of this bug. ***
I was in the process of testing this on various browsers for bug 136740 when it
got duped and figured I'd post this info for future reference. With the test
case at : http://placenamehere.com/Mozilla/linktest.html

Broswers that think href="" is the current document:
Mozilla 0.9.9/ Win & OS X
Opera 6/PC
IE5.1.3/OS X
Opera 5b/OS X
OmniWeb 4.1b2/OS X
iCab2.7.1/OS X
Lynx 2.8.3rel.1/OS X

Broswers that think href="" is the current folder:
IE6/PC
NN4.77/PC
NN4.75/OS X

Note from the test that the following is also true - all browsers tested above
do link to the current directory in the second and third links, so if that's
what a web developer is trying to do I would suggest using one of those. (myself
I always use "./").
*** Bug 116221 has been marked as a duplicate of this bug. ***
*** Bug 201378 has been marked as a duplicate of this bug. ***
*** Bug 323069 has been marked as a duplicate of this bug. ***
*** Bug 323168 has been marked as a duplicate of this bug. ***
*** Bug 263980 has been marked as a duplicate of this bug. ***
*** Bug 339112 has been marked as a duplicate of this bug. ***
*** Bug 265799 has been marked as a duplicate of this bug. ***
*** Bug 272203 has been marked as a duplicate of this bug. ***
*** Bug 310951 has been marked as a duplicate of this bug. ***
*** Bug 321090 has been marked as a duplicate of this bug. ***
Summary: Anchors with HREF="" are wrongly treated as link to current page → Anchors with HREF="" are wrongly treated as link to current page (invalid)
*** Bug 339112 has been marked as a duplicate of this bug. ***
*** Bug 337727 has been marked as a duplicate of this bug. ***
Status: VERIFIED → RESOLVED
Closed: 23 years ago16 years ago
Resolution: INVALID → DUPLICATE
Boris, how is this a duplicate? That bug is about images whereas this one is about anchors.
Er, indeed.  It looks like people were dumping all empty-URI-reference related issues here...  <sigh>.
Resolution: DUPLICATE → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.