W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2010

link-checker commit: Fix anchor parsing in HTML 2.x and 3.x documents, http://lists.w3.org/Archives/Public/www-validator/2007Mar/0065

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 05 Aug 2010 14:47:06 +0000
To: link-checker updates <www-validator-cvs@w3.org>
Message-Id: <E1Oh1is-0005ok-JR@blinky.w3.org>
changeset:   155:f33c9be6d3bc
user:        ville
date:        Tue Mar 20 19:51:01 2007 +0000
files:       bin/checklink
description:
Fix anchor parsing in HTML 2.x and 3.x documents, http://lists.w3.org/Archives/Public/www-validator/2007Mar/0065


diff -r bdf2ec0336f8 -r f33c9be6d3bc bin/checklink
--- a/bin/checklink	Sat Nov 25 12:48:51 2006 +0000
+++ b/bin/checklink	Tue Mar 20 19:51:01 2007 +0000
@@ -5,7 +5,7 @@
 # (c) 1999-2006 World Wide Web Consortium
 # based on Renaud Bruyeron's checklink.pl
 #
-# $Id: checklink,v 4.43 2006-11-25 12:48:51 ville Exp $
+# $Id: checklink,v 4.44 2007-03-20 19:51:01 ville Exp $
 #
 # This program is licensed under the W3C(r) Software License:
 #       http://www.w3.org/Consortium/Legal/copyright-software
@@ -128,7 +128,7 @@
   $PROGRAM     = 'W3C-checklink';
   $VERSION     = '4.3';
   $REVISION    = sprintf('version %s (c) 1999-2006 W3C', $VERSION);
-  my ($cvsver) = q$Revision: 4.43 $ =~ /(\d+[\d\.]*\.\d+)/;
+  my ($cvsver) = q$Revision: 4.44 $ =~ /(\d+[\d\.]*\.\d+)/;
   $AGENT       = sprintf('%s/%s [%s] %s',
                          $PROGRAM, $VERSION, $cvsver, LWP::RobotUA->_agent());
 
@@ -1286,7 +1286,7 @@
 {
   my ($self, $tag, $attr) = @_;
 
-  my $anchor = $attr->{id} if $self->{check_id};
+  my $anchor = $self->{check_id} ? $attr->{id} : undef;
   if ($self->{check_name} && ($tag eq 'a')) {
     # @@@@ In XHTML, <a name="foo" id="foo"> is mandatory
     # Force an error if it's not the case (or if id's and name's values
Received on Thursday, 5 August 2010 14:51:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC