I just moved to wordpress. This is immediately the problem I encountered. The solution provided by above works for the problem of appearing backslashes. But then another problem comes: backslashes that I specifically written were removed.
It seems that the wpautop function is used for auto-formatting p tags. Since I’m hand-coding my posts’ HTML and know how to close my p’s, the best solution for me is to disable wpautop on my posts by disabling the following line in wp-includes/default-filters.php:
add_filter(‘the_content’, ‘wpautop’);