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 4904 - validator bug and inconsistent behavior with: <div>:1:&nbsp;</div>
Summary: validator bug and inconsistent behavior with: <div>:1:&nbsp;</div>
Status: RESOLVED DUPLICATE of bug 4891
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows 2000
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://www.manuelmoser.de/stuff/valid...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-01 18:41 UTC by Manuel Moser
Modified: 2007-08-01 19:18 UTC (History)
0 users

See Also:


Attachments

Description Manuel Moser 2007-08-01 18:41:05 UTC
I think we found a serious bug in the validator. According to my
understanding the following document is valid:

-------------------------------------------
http://www.manuelmoser.de/stuff/validator/notvalid1.html
-------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>blah</title>
</head>
<body>
<div>:1:&nbsp;</div>
</body>
</html>
-------------------------------------------

But the validator complains about the document with the following
message:

-------------------------------------------
Validation Output: 1 Error
 Line 1, Column 14: &nbsp;</div>.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
-------------------------------------------


Some research has shown, that the line number seems to be very random
for this error (depending on the code). I even got an error in line 34
in an document with 18 lines of code. The third line mostly refers to
a random line, or to some tags after the line, where I see the
problem. This gave me some hints and I was able to reduce the problem
to this line: 

<div>:1:&nbsp;</div>

Important for the error seems to be the fact that there a two colon
and a number in between, followed by a &nbsp;

Some examples:

Removing the number makes the document valid:

-------------------------------------------
http://www.manuelmoser.de/stuff/validator/valid1.html
-------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>blah</title>
</head>
<body>
<div>::&nbsp;</div>
</body>
</html>
-------------------------------------------

Changing the number to a letter makes the document valid:

-------------------------------------------
http://www.manuelmoser.de/stuff/validator/valid2.html
-------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>blah</title>
</head>
<body>
<div>:a:&nbsp;</div>
</body>
</html>
-------------------------------------------

Removing the &nbsp; makes the document valid:

-------------------------------------------
http://www.manuelmoser.de/stuff/validator/valid3.html
-------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>blah</title>
</head>
<body>
<div>:1:</div>
</body>
</html>
-------------------------------------------

Manuel Moser
Comment 1 Manuel Moser 2007-08-01 18:49:04 UTC
I'm sorry, I didn't see bug 4891. This here might be the same bug as 4891.
Comment 2 Manuel Moser 2007-08-01 19:18:36 UTC

*** This bug has been marked as a duplicate of bug 4891 ***