summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2009-01-04 20:08:26 +0000
committerville <ville@localhost>2009-01-04 20:08:26 +0000
commit326d5196fd1809078ec8d72c76e0d360f9b5e6f0 (patch)
treed575b7dc18e62a93337c616afc1c6ec5edf8f64d
parent9648ea6d13bf70f511874a5cde7b4688f539c4c7 (diff)
downloadmarkup-validator-326d5196fd1809078ec8d72c76e0d360f9b5e6f0.zip
markup-validator-326d5196fd1809078ec8d72c76e0d360f9b5e6f0.tar.gz
markup-validator-326d5196fd1809078ec8d72c76e0d360f9b5e6f0.tar.bz2
Cleanups.
-rwxr-xr-xhttpd/cgi-bin/check20
1 files changed, 11 insertions, 9 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 8c58dc3..67b1bfe 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.625 2009-01-04 20:05:51 ville Exp $
+# $Id: check,v 1.626 2009-01-04 20:08:26 ville Exp $
#
# Disable buffering on STDOUT!
@@ -198,7 +198,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.625 $;
+ $VERSION = q$Revision: 1.626 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -639,19 +639,21 @@ if ($File->{Charset}->{Use} eq 'utf-8' &&
#
# Override DOCTYPE if user asked for it.
if ($File->{Opt}->{DOCTYPE}) {
- if (not $File->{Opt}->{DOCTYPE} =~ /(Inline|detect)/i) {
- $File = &override_doctype($File);
+ if ($File->{Opt}->{DOCTYPE} !~ /(Inline|detect)/i) {
+ $File = &override_doctype($File);
+ }
+ else {
+ # Get rid of inline|detect for easy truth value checking later
+ $File->{Opt}->{DOCTYPE} = '';
}
}
# Try to extract a DOCTYPE or xmlns.
$File = &preparse_doctype($File);
-if ($File->{Opt}->{DOCTYPE}) {
- if ($File->{Opt}->{DOCTYPE} eq "HTML5") {
- $File->{DOCTYPE} = "HTML5";
- $File->{Version} = $File->{DOCTYPE};
- }
+if ($File->{Opt}->{DOCTYPE} eq "HTML5") {
+ $File->{DOCTYPE} = "HTML5";
+ $File->{Version} = $File->{DOCTYPE};
}
set_parse_mode($File, $CFG);