W3C home > Mailing lists > Public > www-validator@w3.org > September 2011

checklink: base href not taken into account

From: Charles Greathouse <charles.greathouse@case.edu>
Date: Wed, 14 Sep 2011 16:55:40 -0400
Message-ID: <CAAkfSGJ40qHYcLPZ1Gmf7wzaEvYDSR29pdyEXGt8ayqrrxVBkQ@mail.gmail.com>
To: www-validator@w3.org
Checklink appears not to take a document's base URL into account.  I
just submitted a page to be checked by the online version, say
http://example.com/dir/, and it says that a given link (say "<a
href="foo.html>" in the source) is bad, giving its full location as
http://example.com/dir/foo.html

But the source has
<base href="http://example.com/">
and so the link should (and does) point to http://example.com/foo.html

I looked through the source and I couldn't find an attempt to handle
this, so I guess this is a feature recommendation rather than a
bugfix.  The code has a comment

# base/@href intentionally not checked

though this seems to refer to checking the link in <base> rather than
using base to get the document's base location.

Charles Greathouse
Analyst/Programmer
Case Western Reserve University
Received on Thursday, 15 September 2011 07:20:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:48 GMT