[thelist] TIP: Firefox and the double dash

Anthony Baratta anthony at baratta.com
Tue Oct 31 15:21:01 CST 2006

<TIP Author="Anthony Baratta" Type="Firefox, HTML Comments">
Not sure if this is a bug or a feature but Firefox has issues with double dashes with HTML Comment Tags.

For example, a properly formatted HTML Comment should look lke this (using square brackets instead of angle brackets):

[!-- This is a valid comment --]

However, when you have a double dash within the comment, not at the end, Firefox freaks out and will make the comment "extend beyond the area it should.

[!-- This is not -- a valid comment --]

Took me a while to figure out why a whole section of "valid" HTML was not rendering in Firefox. It was due to the addition of double dashes in the comment lines by another coder. The above renders fine in IE, but not in Firefox.

More information about the thelist mailing list