[thelist] HTML Comments and Double Hyphens on Netscape 6.1 and 6.2

Marc Seyon seyon at delime.com
Thu Jun 20 20:22:01 CDT 2002


Message from Ray Hill (6/20/2002 02:10 PM)

>There appears to be a bug in Netscape 6.1 and 6.2 regarding the contents of
>an HTML comment.  Apparently, if you have two consecutive hyphens within an
>HTML comment, it ignores the closing comment tag.
>
>    <!-- Header Table -- Begin -->

I wouldn't call this a bug at all. The specs clearly advise developers to
avoid doing this.

"White space is not permitted between the markup declaration open
delimiter("<!") and the comment open delimiter ("--"), but is permitted
between the comment close delimiter ("--") and the markup declaration close
delimiter (">"). A common error is to include a string of hyphens ("---")
within a comment. Authors should avoid putting two or more adjacent hyphens
inside comments."

<tip type="HTML comments DON'Ts">
DO NOT
a) Place spaces in the opening delimiter of the comment.
b) Use two or more adjacent hyphens as part of your comment.
</tip>




More information about the thelist mailing list