Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.642 diff -r1.642 check 17c17 < # $Id: check,v 1.642 2009-02-03 00:43:36 ot Exp $ --- > # $Id: check,v 1.640 2009-01-30 21:16:26 ville Exp $ 202c202 < $VERSION = q$Revision: 1.642 $; --- > $VERSION = q$Revision: 1.640 $; 400d399 < $File->{Templates}->{UCN}->param(cfg_home_page => $CFG->{'Home Page'}); 439a439,442 > # Parameter for specific JSON output > # ## FIXME ## we need to check in the callback parameter is compatible ECMASCRIPT identifier > $File->{Opt}->{'callback'} = $q->param('callback') ? $q->param('callback') : ''; > 1883,1898c1886,1895 < if($File->{Content}->[$err->{line}-1]) { # avoid truncating lines that do not exist < if (defined($err->{char}) && $err->{char} =~ /^[0-9]+$/ ){ < ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $err->{char}); < $line = &mark_error($line, $col); < } < elsif (defined($err->{line})) { < $col = length($File->{Content}->[$err->{line}-1]); < $col = 80 if ($col > 80); < ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $col); < $line = &ent($line) . "…"; < $col = 0; < } < } < else { < $col = 0; < $line = ""; --- > if (defined($err->{char}) && $err->{char} =~ /^[0-9]+$/ ){ > ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $err->{char}); > $line = &mark_error($line, $col); > } > elsif (defined($err->{line})) { > $col = length($File->{Content}->[$err->{line}-1]); > $col = 80 if ($col > 80); > ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $col); > $line = &ent($line) . "…"; > $col = 0; 2097,2103c2094,2098 < if ($CFG->{Types}->{$proper_FPI}->{SysID}) { < if ($CFG->{Types}->{$proper_FPI}->{SysID} eq $SI) { < &add_warning('W26', {W26_dtd_pub => $FPI, < W26_dtd_pub_display =>$CFG->{Types}->{$proper_FPI}->{Display}, < W26_dtd_sys => $SI, < W26_dtd_pub_recommend=> $proper_FPI }); < } --- > if ($CFG->{Types}->{$proper_FPI}->{SysID} eq $SI) { > &add_warning('W26', {W26_dtd_pub => $FPI, > W26_dtd_pub_display =>$CFG->{Types}->{$proper_FPI}->{Display}, > W26_dtd_sys => $SI, > W26_dtd_pub_recommend=> $proper_FPI }); 2181,2182d2175 < if (! $File->{'Root Version'}) { $File->{'Root Version'} = "0"; } < if (! $File->{'Root BaseProfile'}) { $File->{'Root BaseProfile'} = "0"; } 2187,2188c2180,2181 < } < if ((($File->{'Root Version'} eq "1.1") or ($File->{'Root Version'} eq "0")) and ($File->{'Root BaseProfile'} eq "tiny")) { --- > } > elsif ((($File->{'Root Version'} eq "1.1") or (!$File->{'Root Version'})) and ($File->{'Root BaseProfile'} eq "tiny")) { 2193c2186 < elsif ((($File->{'Root Version'} eq "1.1") or ($File->{'Root Version'} eq "0")) and ($File->{'Root BaseProfile'} eq "basic")) { --- > elsif ((($File->{'Root Version'} eq "1.1") or (!$File->{'Root Version'})) and ($File->{'Root BaseProfile'} eq "basic")) { 2203,2204d2195 < if ($File->{'Root Version'} eq "0") { $File->{'Root Version'} = undef; } < if ($File->{'Root BaseProfile'} eq "0") { $File->{'Root BaseProfile'} = undef; }