summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhttpd/cgi-bin/checklink.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/httpd/cgi-bin/checklink.pl b/httpd/cgi-bin/checklink.pl
index 439bb49..eca658d 100755
--- a/httpd/cgi-bin/checklink.pl
+++ b/httpd/cgi-bin/checklink.pl
@@ -5,7 +5,7 @@
# (c) 1999-2000 World Wide Web Consortium
# based on Renaud Bruyeron's checklink.pl
#
-# $Id: checklink.pl,v 2.38 2000-04-10 22:10:28 hugo Exp $
+# $Id: checklink.pl,v 2.39 2000-04-26 17:07:59 hugo Exp $
#
# This program is licensed under the W3C(r) License:
# http://www.w3.org/Consortium/Legal/copyright-software
@@ -31,7 +31,7 @@ $| = 1;
# Version info
my $PROGRAM = 'W3C checklink';
-my $VERSION = q$Revision: 2.38 $ . '(c) 1999-2000 W3C';
+my $VERSION = q$Revision: 2.39 $ . '(c) 1999-2000 W3C';
my $REVISION; ($REVISION = $VERSION) =~ s/Revision: (\d+\.\d+) .*/$1/;
# Different options specified by the user
@@ -787,8 +787,6 @@ sub W3C::CheckLink::new() {
$p->{check_id} = 1;
# Loose interpretation of the HTML comments since browsers will do the same
$p->strict_comment(0);
- # Enable XML extensions
- $p->xml_mode(1);
return $p;
}
@@ -802,13 +800,12 @@ sub W3C::CheckLink::doctype() {
if (! $dc) {
return $self->{doctype};
}
- $self->{doctype} = $dc;
+ $_ = $self->{doctype} = $dc;
# What to look for depending on the doctype
- if ($dc eq '-//W3C//DTD XHTML Basic 1.0//EN') {
+ if ($_ eq '-//W3C//DTD XHTML Basic 1.0//EN') {
$self->{check_name} = 0;
}
- $_ = $dc;
# Check for the id tag
if (
# HTML 2.0 & 3.0
@@ -817,6 +814,10 @@ sub W3C::CheckLink::doctype() {
m/^-\/\/W3C\/\/DTD HTML 3\.2\/\//) {
$self->{check_id} = 0;
}
+ # Enable XML extensions
+ if (m/^-\/\/W3C\/\/DTD XHTML /) {
+ $self->xml_mode(1);
+ }
}
#######################################