If you are having trouble with wordpress screwing up your HTML comments, maybe some “intelligent” formatting is to blame.
Lines 56 and 57 of /wp-includes/formatting.php
before:
$static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn–', '...', '
‘, ‘\’s’, ‘\’\”, ‘ ™’), $cockney);
$static_replacements = array_merge(array(‘—’, ‘ — ‘, ‘–’, ‘ – ‘, ‘xn--‘, ‘…’, $opening_quote, ‘’s’, $closing_quote, ‘ ™’), $cockneyreplace); `
after:
$static_characters = array_merge(array(/*'---', ' -- ', '--',*/ ' - ', 'xn–', '...', '
‘, ‘\’s’, ‘\’\”, ‘ ™’), $cockney);
$static_replacements = array_merge(array(/*’—’, ‘ — ‘, ‘–’, */’ – ‘, ‘xn--‘, ‘…’, $opening_quote, ‘’s’, $closing_quote, ‘ ™’), $cockneyreplace);`
Of course, you won’t get fancy – (& # 8211 ?? characters when you put in double hyphens. But honestly, I don’t care.
Bah, and now it’s being too fancy here too. Just look those lines up.
(Also, why is there not a preview function?)