diff options
author | ot <ot@localhost> | 2007-03-16 00:34:17 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-03-16 00:34:17 +0000 |
commit | cd87be337ce61423ed6b5450548ad32febaef82f (patch) | |
tree | c8648fa5d16d22ab62f875168220714070efa5c9 | |
parent | f64a8e7ef0cfd29ad270da13007f8179fb91cc17 (diff) | |
download | markup-validator-cd87be337ce61423ed6b5450548ad32febaef82f.zip markup-validator-cd87be337ce61423ed6b5450548ad32febaef82f.tar.gz markup-validator-cd87be337ce61423ed6b5450548ad32febaef82f.tar.bz2 |
tentative fix for http://www.w3.org/Bugs/Public/show_bug.cgi?id=3992
(parser tripping on DOS newlines)
-rwxr-xr-x | httpd/cgi-bin/check | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 4883a64..251d0d7 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.479 2007-03-15 06:30:14 ot Exp $ +# $Id: check,v 1.480 2007-03-16 00:34:17 ot Exp $ # # Disable buffering on STDOUT! @@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.479 $; + $VERSION = q$Revision: 1.480 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1862,6 +1862,11 @@ sub transcode { # @@FIXME is this what we want? $output =~ s/\015?\012/\n/g; + + # make sure we deal only with unix newlines + # tentative fix for http://www.w3.org/Bugs/Public/show_bug.cgi?id=3992 + $output =~ s/(\r\n|\n|\r)/\n/g; + $File->{Content} = [split/\n/, $output]; return $File; |