Comment not terminated

A comment is not closed with -->, or contains --.

The message, as the validator reports it
Comment not terminated

Why it happens

  • A missing -->: the comment then runs to the end of the file.
  • Two hyphens inside a comment (<!-- a -- b -->), which XML forbids: Double hyphen within comment.

How to fix it

Close the comment with -->, and do not use -- inside it.

Example

Reports the error
<note><!-- todo </note>
Fixed
<note><!-- todo --></note>