Preserved HTML Editor Markup is your solution, it is a plugin that preserves your custom HTML code. By default WordPress’s TinyMCE will often mess up special HTML tags you use when you switch to the Visual editor even just for a second. Preserved HTML Editor Markup stops this from happening. It is particularly useful for people who like to embed snippets of highlighted programming code in their blog posts because this requires special HTML tags. I’ve tested it with Google Syntax Highlighter for WordPress and it works wonderfully.