it seems FF doesn’t agree with you
i was willing to take your word for it and test it again. i’ve put your test markup:
<p>this p is fully commented, and should not render</p>
<p>this p is commented within broken comment tag, and will render</p> ->
<p>should be commented, but is not</p>
in a test.html file. tried it in FF 3.6.6 and it was rendering this:
thought that maybe in FF 3.6.8 things are different. so i updated my FF to 3.6.8 and test it again. the rendering is:
is there something i’m not doing right?
regarding html 4 specs, it says pretty clear:
HTML comments have the following syntax:
<!-- this is a comment –>
<!-- and so is this one,
which occupies more than one line –>
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.
Information that appears between comments has no special meaning (e.g., character references are not interpreted as such).
Note that comments are markup.
- the start tag <!–, with no spaces
- end tag –>, but there are spaces allowed between – and >, so it could be – >, but it seems UAs don’t agree to this one
- no use of – inside comments, but UAs are not affected, not even FF agrees; if i put – or — sequences between 1st and 4th with 1st to 3rd end tag comment invalidated (->) the rendering is still only outer paragraphs (this recommendation supposed to prove your point, but even here, there is a <!-- sequence, not a – sequence)
- comments are markup
nothing new here. your test case does not prove your position, FF or otherwise. your comment is not closed until you complete your – with a >, and if you don’t stick anything in between those other than white space, all works as is supposed to.
my “rendering bug” works even in FF, meaning that my proposition
<!-- 1st comment ->
<p>1st inner paraghraph</p>
<!-- 2nd comment ->
<p>2nd inner paraghraph</p>
<!-- 3rd comment ->
<p>3rd inner paraghraph</p>
<!-- 4th comment -->
works and renders the same way in all big 5 (including FF), as i’ve tested before posting :), like this
does “your” FF renders my test otherwise? or yours, for that matter? 'cos i even tried putting – and — in both of them and it didn’t make any impact, FF or otherwise. the only bad thing happens when i put white space between – and >, trying to use – > instead of –> as the closing sequence, which is/was never my intention