Get Firefox! "my blog doesn't just deal with my life, it deals with some important stuff too"

21st of February 2005

Weird Bug

Just found a weird bug in the Gecko rendering engine. I had a comment in some HTML which looked like

<!-- reason for commenting a load of HTML

--matt

commented html -->

Yet the commented HTML still displayed. I couldn't work it out, until I did a "view source" from within the browser itself and found that everything before --matt was green (to show it is a comment) and everything after was marked as normal HTML. --matt and --> have one thing in common: the "--" bit. Sure enough, changing "--matt" to "- - matt" fixed the problem. It seems it interprets "--X" (where X represents any character) as an "end of comments" tag.

UPDATE: This isn't a bug, it's the correct behaviour. However it's fuckin' weird behaviour. See the HTML spec

Blog #453, posted at 17:00 (GMT)