diff options
-rwxr-xr-x | httpd/cgi-bin/check | 16 | ||||
-rw-r--r-- | share/templates/en_US/jumpbar.tmpl | 4 | ||||
-rw-r--r-- | share/templates/en_US/result.tmpl | 4 | ||||
-rw-r--r-- | share/templates/en_US/warnings.tmpl | 17 |
4 files changed, 26 insertions, 15 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 9d48391..583e167 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.689 2009-09-12 14:49:28 ville Exp $ +# $Id: check,v 1.690 2009-09-12 15:57:50 ville Exp $ # # Disable buffering on STDOUT! $| = 1; @@ -206,7 +206,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.689 $; + $VERSION = q$Revision: 1.690 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1223,16 +1223,12 @@ if (!$File->{'Is Valid'} && $File->{Opt}->{'Show Tidy'}) { $cleaned = Encode::decode_utf8($cleaned); $File->{Tidy} = $cleaned; }; - $File->{Tidy_OK} = !$@; -} -else { - # if document is valid, we don't really need tidy, do we? - $File->{Tidy_OK} = FALSE; + if ($@) { + (my $errmsg = $@) =~ s/ at .*//s; + &add_warning('W29', { W29_msg => $errmsg }); + } } -# if tidy not available, disable -$File->{Opt}->{'Show Tidy'} &&= $File->{Tidy_OK}; - my $template; if ($File->{Opt}->{Output} eq 'xml') { diff --git a/share/templates/en_US/jumpbar.tmpl b/share/templates/en_US/jumpbar.tmpl index 32d449f..2a78213 100644 --- a/share/templates/en_US/jumpbar.tmpl +++ b/share/templates/en_US/jumpbar.tmpl @@ -17,9 +17,9 @@ <TMPL_IF NAME="opt_show_source"> <li><a title="Listing of Source Input" href="#source">Source Listing</a></li> </TMPL_IF> - <TMPL_IF NAME="opt_show_tidy"> + <TMPL_IF NAME="opt_show_tidy"><TMPL_IF NAME="tidy_output"> <li><a title="Listing of cleaned-up Source Input" href="#tidy">Tidy Source</a></li> - </TMPL_IF> + </TMPL_IF></TMPL_IF> <TMPL_IF NAME="opt_show_outline"> <li><a title="Document Outline" href="#outlineresult">Outline</a></li> </TMPL_IF> diff --git a/share/templates/en_US/result.tmpl b/share/templates/en_US/result.tmpl index 86fd95d..8f4a4ed 100644 --- a/share/templates/en_US/result.tmpl +++ b/share/templates/en_US/result.tmpl @@ -24,9 +24,9 @@ <TMPL_INCLUDE NAME="opt_show_source.tmpl"> </TMPL_IF> - <TMPL_IF NAME="opt_show_tidy"> + <TMPL_IF NAME="opt_show_tidy"><TMPL_IF NAME="tidy_output"> <TMPL_INCLUDE NAME="opt_show_tidy.tmpl"> - </TMPL_IF> + </TMPL_IF></TMPL_IF> <TMPL_IF NAME="opt_show_outline"> <TMPL_INCLUDE NAME="opt_show_outline.tmpl"> diff --git a/share/templates/en_US/warnings.tmpl b/share/templates/en_US/warnings.tmpl index 2d96242..c45cf33 100644 --- a/share/templates/en_US/warnings.tmpl +++ b/share/templates/en_US/warnings.tmpl @@ -1,5 +1,5 @@ <h3 id="preparse_warnings">Notes and Potential Issues</h3> -<p>The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation. If the guess or fallback is incorrect, it could make validation results entirely incoherent. It is <em>highly recommended</em> +<p>The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation, or other things affecting the output below. If the guess or fallback is incorrect, it could make validation results entirely incoherent. It is <em>highly recommended</em> to check these potential issues, and, if necessary, fix them and re-validate the document.</p> <ol id="warnings"> @@ -486,6 +486,7 @@ to check these potential issues, and, if necessary, fix them and re-validate the <p>Validation was performed as if the DOCTYPE for <TMPL_VAR NAME="W25_dtd" ESCAPE="HTML"> was present. If this automatic detection is not correct, <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" title="W3C QA - Recommended list of DTDs you can use in your Web document">adding a DOCTYPE declaration</a> will help validate without ambiguity.</p> </li> </TMPL_IF> + <TMPL_IF NAME="W26"> <li class="msg_warn" id="W26"><p><span class="err_type"><img src="images/info_icons/warning.png" alt="Warning" title="Warning" /></span> <span class="msg">Mismatch between Public and System identifiers in the DOCTYPE declaration</span></p> <p>This document uses an inconsistent DOCTYPE declaration. @@ -530,6 +531,20 @@ to check these potential issues, and, if necessary, fix them and re-validate the </li> </TMPL_IF> +<TMPL_IF NAME="W29"> + <li class="msg_warn" id="W29"><p><span class="err_type"><img src="images/info_icons/warning.png" alt="Warning" title="Warning" /></span> <span class="msg">Error cleaning up markup with HTML Tidy.</span></p> + <p> + An error occurred while cleaning up markup with HTML Tidy. The reported + error was:<br /> + <TMPL_VAR NAME="W29_msg" ESCAPE="HTML"> + </p> + <p> + It is unlikely that this is a problem with the checked document, but + rather a software or configuration issue with the validator. + </p> + </li> +</TMPL_IF> + <TMPL_IF NAME="W@@"> |