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 5555 - Really invalid comment declaration?
Summary: Really invalid comment declaration?
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-10 18:13 UTC by Pavel Janda
Modified: 2008-03-10 19:45 UTC (History)
0 users

See Also:


Attachments

Description Pavel Janda 2008-03-10 18:13:40 UTC
The source like this:

<script language="javascript" type="text/javascript">
<!--
		
pocetpobocek--;
		
//-->
</script>

------------------------------
Returns those errors
------------------------------


Validation Output:  2 Errors

   1. Error Line 161, Column 16: invalid comment declaration: found character ";" outside comment but inside comment declaration.

      		pocetpobocek--;

      &#9993;

      Check that you are using a proper syntax for your comments, e.g: <!-- comment here -->. This error may appear if you forget the last "--" to close one comment, and later open another.
   2. Info Line 159, Column 2: comment declaration started here.

      		<!--

   3. Error Line 161, Column 14: XML Parsing Error: Comment not terminated .

      		pocetpobocek--;
Comment 1 Olivier Thereaux 2008-03-10 19:45:11 UTC
yes, really invalid. -- is a comment delimiter in XML.

Quick suggestion: avoid embedding javascript in xhtml - you're way better off using an external script file, for many reasons.