I tend to post quite a bit of sourcecode, such as bash scripts and PHP scripts. I use the SyntaxHighlighter Evolved plugin to highlight and colorize the sourcecode, as well as make it easy to copy.
Unfortunately, I’ve noticed that the WordPress built-in visual editor does a great job of mangling the code, especially by HTML-escaping certain characters.
I’ve found that installing the TinyMCE Advanced plugin has fixed the cause of it, as well as providing a ‘replace’ function which I can quickly use to clean up previously-mangled code.
I’ve gone through my posts and hopefully corrected any previously mangled sourcecode. I’d like to say thank you to everyone who has brought a piece to my attention.
I strongly recommend the above plugins.