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 120 - improve error message for ampersand (&) in URI for xhtml
Summary: improve error message for ampersand (&) in URI for xhtml
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.6.1
Hardware: Other other
: P2 enhancement
Target Milestone: 0.7.0
Assignee: Terje Bless
QA Contact:
URL: http://validator.w3.org/check
Whiteboard:
Keywords:
Depends on:
Blocks: 856
  Show dependency treegraph
 
Reported: 2002-12-10 03:27 UTC by Ralf Hauser
Modified: 2005-06-17 23:56 UTC (History)
0 users

See Also:


Attachments

Description Ralf Hauser 2002-12-10 03:27:28 UTC
having an ampersand like
href="http://www.auscert.org.au/render.html?it=2260&cid=1920 immediately causes
7 errors.
There is an "explain" link that takes me to
http://validator.w3.org/docs/errors.html#bad-entity, but even though it's second
<li> talks about using &amp, its worrying about the missing semicolon in the end
and the true reason (http://www.htmlhelp.com/tools/validator/problems.html#amp)
is never mentioned.
Comment 1 Terje Bless 2003-03-01 14:15:40 UTC
Target 0.6.2; this wants a little thinking to avoid "optimizing" exclusively on
one of the possible reasons for this error message. At a minimum this error
explanation should include the WDG link and make clear the situation with & in URIs.
Comment 2 Terje Bless 2003-05-24 07:21:12 UTC
Retargetting to 0.7; this fits nicely in with the general framework for
improving error messages planned for that timeframe.
Comment 3 Terje Bless 2004-09-01 13:18:28 UTC
Nominating for review for the 0.7.0 release.
Comment 4 Olivier Thereaux 2004-09-08 02:42:14 UTC
AFAIK this was addressed in 0.6.5 with the "error message explanations" feature
Comment 5 TarquinWJ 2005-06-15 11:17:30 UTC
Re-opening, as this is the current error message:

"Line 221, column 8: character "&" is the first character of a delimiter but 
occurred as data

<h2>Foo & Bar</h2>

If you wish to include the "<" character in your output, you should escape it as 
"&lt;". Another possibility is that you forgot to close quotes in a previous 
tag."

That was not an attempt to add a < character - validator recognised it as a & 
character, then gave the info for the < character.
Comment 6 Olivier Thereaux 2005-06-17 23:56:37 UTC
(In reply to comment #5)
> Re-opening, as this is the current error message:
> 
> "Line 221, column 8: character "&" is the first character of a delimiter but 
> occurred as data
> 
> <h2>Foo & Bar</h2>

Strictly speaking, You are talking about the warning message for ampersand as data, *not* the error 
message for an ampersand in a URI. As such, your comment is more relevant to Bug 798 than this one.

If you want  to suggest a better warning message for ampersand as data, I  would recommend sending 
a message to the public list www-validator@w3.org - or opening a new issue on bugzilla.