Flutterby™! : Firefox ignoring comment markers?

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Firefox ignoring comment markers?

2007-04-02 16:21:26.69698+00 by Dan Lyke 3 comments

Interesting... I put comment markers around the "Sites Dan Reads" section over there on the right because I wanted to disable it for the moment. I had forgotten whether or not the templating system removed comment blocks, but the section disappeared on my Opera view of the page, so I thought everything was hunky-dory and carried on with my life. Then yesterday afternoon I had the Windows machine fired up to do taxes, and brought up Firefox to surf around while I was waiting for printing, and, lo and behold, there was the sidebar I thought I'd excised.

Apparently Firefox ignores HTML comment markers and renders the comment as though it were regular HTML. Interesting.

[ related topics: Politics Microsoft Open Source California Culture ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2007-04-02 19:07:19.61599+00 by: spc476

Firefox renders HTML comments per spec—it's Opera that's a bit more lax in parsing. I found the problem, but only after viewing source in Firefox (and it color codes the HTML, which helps). The problem is in the text for the ErosBlog link, two dashes. That stops comment processing actually.

<!-- this is hidden -->

#Comment Re: made: 2007-04-02 19:08:51.675181+00 by: spc476 [edit history]

Hmm … interesting. I tried doing the following (with "< >" replaced with "[ ]"):

[!-- this is hidden -- but this may not be --]

And it disappeared, maybe in the code, haven't checked.

#Comment Re: made: 2007-04-03 14:34:27.950097+00 by: Dan Lyke

Except that the document is XHTML, not HTML, so you'd expect that it'd use the XML comment processing rules rather than the SGML processing rules.