One supremely annoying problem I had the first days of using WordPress was that it kept on “beautifying” my code samples. For example replacing normal quotes with curly ones. For normal text that’s okay I guess, but for code it isn’t!
string s = â€œthis is a stringâ€;
Luckily however, this can be fixed by using using a plugin called Preserve Code Formatting by Scott Reilly. Very useful!
Just install it and after that WordPress will keep it’s dirty hands off content within <code>-tags.
The code sample above now reads:
string s = "this is a string";