This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 67 - Unescaped ampersands not caught
Summary: Unescaped ampersands not caught
Status: RESOLVED REMIND
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.6.0b2
Hardware: Other other
: P2 major
Target Milestone: ---
Assignee: Terje Bless
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-12 23:28 UTC by Ville Skyttä
Modified: 2002-11-15 03:27 UTC (History)
0 users

See Also:


Attachments

Description Ville Skyttä 2002-11-12 23:28:11 UTC
Reported by "elfin".  Here's a couple of samples:

<http://koti.welho.com/vskytta/foo.html>
<http://koti.welho.com/vskytta/foo2.html>

...and a possible fix follows.  Maybe the relationship between $File->{Is Valid}
and $File->{Errors} needs checking, it makes the code pretty hard to read in
various places.

--- check	2002/11/11 23:31:31	1.291
+++ check	2002/11/12 22:07:13
@@ -568,7 +568,7 @@
 
 if ($File->{ESIS}->[-1] =~ /^C$/) {
   undef $File->{ESIS}->[-1];
-  $File->{'Is Valid'} = TRUE;
+  $File->{'Is Valid'} = scalar(@{$File->{Errors}}) ? FALSE : TRUE;
 } else {
   $File->{'Is Valid'} = FALSE;
 }
Comment 1 Terje Bless 2002-11-14 22:27:58 UTC
Demoting a document to invalid based on these messages is not necessarily
correct. They're tagged as "Warnings" from OpenSP; probably because an entity
reference cannot be null and so these bare amperstands aren't actually entity
references, they're just a character that normally introduces one.

I've added these warnings to the output for Valid documents until we figure out
what the canon has to say.