summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhttpd/cgi-bin/check37
1 files changed, 1 insertions, 36 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index f048268..f303952 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -1277,21 +1277,7 @@ sub xmlwf (\$)
&override_charset($File, "UTF-8");
- my $xml_string = join "\n", @{$File->{Content}};
-
- my $xmlws = qr/[\x20\x09\x0D\x0A]/o;
-
- # Is the document standalone? Need to check with a regex because the
- # parser may fail to return a document we could use for this.
- my $standalone = (
- $xml_string =~ /^<\?xml\b[^>]*${xmlws}
- standalone${xmlws}*=${xmlws}*
- (["'])yes\1
- /sox
- );
-
- eval { $xmlparser->parse_string($xml_string); };
- $xml_string = undef;
+ eval { $xmlparser->parse_string(join("\n", @{$File->{Content}})); };
my @xmlwf_error_list;
if (ref($@)) {
@@ -1311,16 +1297,6 @@ sub xmlwf (\$)
$err_obj = $err_obj->_prev();
- # The validator will sometimes fail to dereference entities files;
- # we're filtering the resulting bogus error for non-standalone
- # documents. @@@TODO: is this still needed?
- if (!$standalone &&
- $err->{msg} =~ /Entity '\w+' not defined/)
- {
- $err = undef;
- next;
- }
-
unshift(@xmlwf_error_list, $err);
}
}
@@ -1411,17 +1387,6 @@ sub xmlwf (\$)
$err->{type} = "E";
$err->{msg} = $xmlwf_error_msg;
- # The validator will sometimes fail to dereference entities
- # files; we're filtering the resulting bogus error for
- # non-standalone documents. @@@TODO: is this still needed?
- if (!$standalone &&
- $err->{msg} =~ /Entity '\w+' not defined/)
- {
- $xmlwf_error_line = undef;
- $xmlwf_error_col = undef;
- $xmlwf_error_msg = undef;
- next;
- }
push(@xmlwf_error_list, $err);
$xmlwf_error_line = undef;
$xmlwf_error_col = undef;