summaryrefslogtreecommitdiffstats
path: root/httpd/cgi-bin/check
diff options
context:
space:
mode:
authorville <ville@localhost>2009-08-13 15:33:05 +0000
committerville <ville@localhost>2009-08-13 15:33:05 +0000
commit38451b83ff249a0c117988af3c0d28f6f23f40e7 (patch)
tree4c8b6d463de0768fe528b5185146c9bcdff338c3 /httpd/cgi-bin/check
parentcce96c3f76988f3e5bc7c20f83df064a123504d3 (diff)
downloadmarkup-validator-38451b83ff249a0c117988af3c0d28f6f23f40e7.zip
markup-validator-38451b83ff249a0c117988af3c0d28f6f23f40e7.tar.gz
markup-validator-38451b83ff249a0c117988af3c0d28f6f23f40e7.tar.bz2
Another stab at fixing confusing "did you mean foo" hints in error messages.
Diffstat (limited to 'httpd/cgi-bin/check')
-rwxr-xr-xhttpd/cgi-bin/check10
1 files changed, 6 insertions, 4 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 2f3f2a3..5f3be77 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.679 2009-08-11 11:04:12 ville Exp $
+# $Id: check,v 1.680 2009-08-13 15:33:05 ville Exp $
#
# Disable buffering on STDOUT!
$| = 1;
@@ -206,7 +206,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.679 $;
+ $VERSION = q$Revision: 1.680 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -3148,9 +3148,11 @@ sub error
$err->{msg} = "Attribute \"".$bogus_elt_attr."\" is not a valid attribute";
}
- if((exists $self->{CFG}->{Attributes}->{lc($bogus_elt_attr)}) and ($err->{num} eq '108')) {
+ if(($err->{num} eq '108') and
+ (exists $self->{CFG}->{Attributes}->{lc($bogus_elt_attr)}) and
+ (!$is_xml || $bogus_elt_attr eq lc($bogus_elt_attr))) {
# attribute not available in this context.
- $err->{msg} = 'Attribute "'.lc($bogus_elt_attr).'" can not be used for this element.';
+ $err->{msg} = "Attribute \"$bogus_elt_attr\" can not be used for this element.";
}
elsif ( (
((exists $self->{CFG}->{Attributes}->{lc($bogus_elt_attr)}) and ($err->{num} eq '108'))