summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlink <link@localhost>2002-12-05 04:06:23 +0000
committerlink <link@localhost>2002-12-05 04:06:23 +0000
commita8c4e9be3f447bdb37c422af54fd4dcfde45a138 (patch)
treec12613a32cce49f9a37ee8a49de90faa9d75f324
parentd1357cbd508e003aa66c2a6e43ba7c8d3a3abc21 (diff)
downloadmarkup-validator-a8c4e9be3f447bdb37c422af54fd4dcfde45a138.zip
markup-validator-a8c4e9be3f447bdb37c422af54fd4dcfde45a138.tar.gz
markup-validator-a8c4e9be3f447bdb37c422af54fd4dcfde45a138.tar.bz2
Forward-port image/svg fix from Martin. (0.6->HEAD)
-rwxr-xr-xhttpd/cgi-bin/check10
1 files changed, 7 insertions, 3 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 98a3147..916de87 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -9,7 +9,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.314 2002-12-05 03:43:56 link Exp $
+# $Id: check,v 1.315 2002-12-05 04:06:23 link Exp $
#
# Disable buffering on STDOUT!
@@ -133,7 +133,7 @@ The error reported was: '$@'
#
# Strings
- $VERSION = q$Revision: 1.314 $;
+ $VERSION = q$Revision: 1.315 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
} # end of BEGIN block.
@@ -307,7 +307,11 @@ if ($File->{Charset}->{HTTP}) { # HTTP, if given, is authoritative.
$File->{Charset}->{Use} = 'utf-16';
} elsif ($File->{ContentType} =~ m(^application/([-.a-zA-Z0-9]+\+)?xml$)) {
$File->{Charset}->{Use} = "utf-8";
-} # @@@FIXME: Need case for image/svg+xml etc.
+} elsif (&is_xml($File) and not $File->{ContentType} =~ m(^text/)) {
+ $File->{Charset}->{Use} = 'utf-8'; # UTF-8 (image/svg+xml etc.)
+}
+
+
$File->{Content} = &normalize_newlines($File->{Bytes},
exact_charset($File, $File->{Charset}->{Use}));