So I have a site where there are a lot of places where html comments are written as
I noticed that when you write:
<div>hello</div>
<!-- COMMENT --------------- //-->
<div>hello2</div>
Only hello2 shows. If you don't type in the dashes at the end:
<div>hello3</div>
<!-- COMMENT --------------- -->
<div>hello4</div>
then both hello3 and hello4 are printed. Now, is there a way for me to make this work how it is suppposed to without going through the whole site and changing all the comments? BTW it shows fine in all browsers, including firefox 4 and even IE. The problem only occurs on FF 3.6
The comment is started and finished by the sequence --
.
<!-- COMMENT --------------- //-->
means:
There is a reason that the HTML specification says:
A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments.
Now, is there a way for me to make this work how it is suppposed to without going through the whole site and changing all the comments?
No.
BTW it shows fine in all browsers, including firefox 4 and even IE. The problem only occurs on FF 3.6
Too many bad authors depending on bugs in how some browsers mishandled comments meant that browser vendors have given up trying to implement comments correctly.
Mozilla didn't give up until after Firefox 3.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With