diff options
author | ot <ot@localhost> | 2007-09-11 06:45:38 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-09-11 06:45:38 +0000 |
commit | b691d15799f347884a0aac16f68d5b126c237fda (patch) | |
tree | a01df8d06a270353acbb82fb5acda40974ea6197 | |
parent | ad8a0cd53506c0de18af9df3db8a8d23f80431b6 (diff) | |
download | markup-validator-b691d15799f347884a0aac16f68d5b126c237fda.zip markup-validator-b691d15799f347884a0aac16f68d5b126c237fda.tar.gz markup-validator-b691d15799f347884a0aac16f68d5b126c237fda.tar.bz2 |
Making doctype detection work with document types using dashes or dots
in root element (allowed in XML, at least).
This fixes Bug 5031: http://www.w3.org/Bugs/Public/show_bug.cgi?id=5031
-rwxr-xr-x | httpd/cgi-bin/check | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 68cd0d7..83a0ace 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.565 2007-09-11 05:58:30 ot Exp $ +# $Id: check,v 1.566 2007-09-11 06:45:38 ot Exp $ # # Disable buffering on STDOUT! @@ -186,7 +186,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.565 $; + $VERSION = q$Revision: 1.566 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1844,7 +1844,7 @@ sub preparse_doctype { my $dtd = sub { return if $File->{Root}; # TODO: The \s and \w are probably wrong now that the strings are utf8_on - ($File->{Root}, $File->{DOCTYPE}) = shift =~ m(<!DOCTYPE\s+(\w+)\s+(?:PUBLIC|SYSTEM)\s+(?:[\'\"])([^\"\']+)(?:[\"\']).*>)si; + ($File->{Root}, $File->{DOCTYPE}) = shift =~ m(<!DOCTYPE\s+(\w[\w\.-]+)\s+(?:PUBLIC|SYSTEM)\s+(?:[\'\"])([^\"\']+)(?:[\"\']).*>)si; }; my $start = sub { |