I was having some issues working with the <pre> and <code> tags for WordPress. The code snippets I was posting were breaking the tags and not displaying correctly. After reading the documentation for <pre> and <code>, I figured out that I needed to encode the “<" ">” and “/” symbols that I was using with their html code (“lt;”, “gt;” and “#47;”).
In an effort to save me time in the future and to help you, I’ve created a little program to strip out the symbols mentioned above and replace them with their html codes. You can view the encoder here. Please let me know if you have any issues. Enjoy!