HTML comments break down *

Question

I have a page that is generated which inserts an HTML comment near the top of the page. Inside the comment is a *nix-style command.

<!-- command --option value --option2 value2 --option3 -->

This comment breaks the page completely. What is wrong with the comment to cause this to happen, and why is this the case?

Answer

Comments in the XML Spec from the w3.org :

For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments.

< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/5425/" >HTML comments break down< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment